Eric Sammer wrote:
Stas Bekman wrote:

You have this problem when running a sub-request. In which case you need to do:

my $pnote = $r->main ? $r->main->pnotes('foo') : $r->pnotes('foo');

http://perl.apache.org/docs/1.0/api/Apache.html#_r_E_gt_main
http://perl.apache.org/docs/1.0/guide/snippets.html#Passing_Notes_Between_mod_perl_and_other__non_Perl__Apache_Modules



Oddly enough, the object is not in $r->main->pnotes() either. On the other hand, I try $r->prev->pnotes() and it *is* there and works. The handler isn't redirecting or anything - am I wrong in assuming it should be main rather than prev? The way it is now seems as if it's a redirect rather than a subrequest.


Either way, it works with $r->prev() even if I'm unclear about why. Once again, thanks Stas!

Yes, sorry, it's $r->prev(), was writing from memory...


Your handler doesn't redirect, but Apache does / -> /index.tt is a subrequest.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to