Nathanial P. Hendler wrote:
Yes, I'd read that section several times before posting.  I understand
that the setting is enabled at some points, disabled at others, and can be
enabled.  I don't have an old version if CGI.pm, and I don't understand
what that has to do with anything.  It seems to do more than just setup
the global $r object, since it changes the way all my globals behave.

I'd like to know if people want access to $r in their modules, and if so,
do they pass their modules $r, or do they turn on GlobalRequest, and is it
a sane thing to do?

the best and the safest approach is to pass it around.

You could also use a Singleton. There are a few of them on CPAN and there is one example how to write your own in the "Practical mod_perl" book.

On Fri, 28 May 2004, Stas Bekman wrote:


Nathanial P. Hendler wrote:
[...]

What does GlobalRequest do
exactly, and is there a better way to get Apache->request in modules?

http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_




--
__________________________________________________________________
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

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to