You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Artem Kuchin <ma...@itlegion.ru> on 2008/04/16 21:58:13 UTC

Access to Server and Request objects under Registry

Hello!

Is there any way to access server and request objects
when script is running under Registry?

--
Regards,
Artem



Re: Access to Server and Request objects under Registry

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Artem Kuchin wrote:
> Hello!
> 
> Is there any way to access server and request objects
> when script is running under Registry?

# From the top-level
my $r = shift;

OR
# PerlOptions +GlobalRequest
# Apache2::RequestUtil (http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_request_)
use Apache2::RequestUtil;
my $r = Apache2::RequestUtil->request

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/


Re: Access to Server and Request objects under Registry

Posted by ad...@utoronto.ca.
my $r = shift;

at the top of your file running under registry should work.  You can  
also use Apache->request in mp1, or Apache2::RequestUtil->request in  
mp2 (if you're using the prefork mpm)

Adam

Quoting Artem Kuchin <ma...@itlegion.ru>:

> Hello!
>
> Is there any way to access server and request objects
> when script is running under Registry?
>
> --
> Regards,
> Artem