On 10/23/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> My problems were more along the lines of not realizing that an internal
> subrequest was happening, which (if memory serves) would end up clearing
> pnotes (or maybe my code was clearing/resetting pnotes when re-traversed for
> the subrequest).

In mod_perl 1, you can only store pnotes at a request level, so a
subrequest has separate pnotes.  This meant you would need to lookup
the parent request ($r->main) to get your pnotes.  In mod_perl 2, you
have the option of using pnotes on a connection level instead of a
request level.

I recommend pnotes any time you need to pass data between mod_perl
phases or store something that has to be cleared at the end of every
request.  It's generally more reliable than using globals and manually
clearing them in a cleanup handler.

- Perrin

Reply via email to