On Thu, Feb 21, 2002 at 01:17:02AM +0200, Issac Goldstand wrote:
> [EMAIL PROTECTED] wrote:
> [snip]
> 
> >As I need information between the stage of life, I would use $r->notes to
> >communicate down the cycle. But then again, if I have some data tied
> >to the session (I use Apache::Session), how can I give it to
> >the PerlHandler. Is $r->notes proofed for any export, object or blessing
> >behavior?
> >
> I think $r->pnotes should work fine with this...  But I'm not positive...
> Other than that, it sounds fine...  Except that usually youll 
> authenticate the user in PerlAuthenHandler and use AuthzHandler to 
> decide whether or not to let him do whatever he's trying to do... The 
> Eagle book had some nice explanations of this...

If you have complex data structures pnotes() is definitely the way to
go..  Highly recommended.

Another alternative is to use package globals.  Just make sure that
your PerlInitHandler and PerlCleanupHandler re-initializes them before
every request..

Note: I have not compared the speed differences between these two
approaches.  I would assume the latter would be a little faster.  Of
course it will make your code non-thread-safe, so it's not so good for
potential mod_perl 2.0 compatibility..

-- 
Paul Lindner    [EMAIL PROTECTED]   ||||| | | | |  |  |  |   |   |

    mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
         Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm

Reply via email to