Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Re: what handler phase as we in?

Anthony R Fletcher

2008-04-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello Philippe

Perfect - thanks.

   Anthony

On 07 Apr 2008 at 16:39:02, Philippe M. Chiasson wrote:
> Anthony R Fletcher wrote:
>> I have a module that does authentication and authorisation. In my Apache
>> configs I have:
>>
>>  PerlAuthenHandler Apache2::AuthX::authenticate
>>  PerlAuthzHandler Apache2::AuthX::authorise
>>
>> I'd rather just use:
>>
>>  PerlAuthenHandler Apache2::AuthX
>>  PerlAuthzHandler Apache2::AuthX
>>
>> and let the handler function Apache2::AuthX::handler() deduce what has
>> to be done (i.e. authenticate or authorise).
>
> You do end up paying a small overhead in forcing that determination at
> run time in your code, but I agree it's somewhat neater.
>
>> How can handlers tell which phase they are currently in?
>
> ModPerl::Util::current_callback()
>
> http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_current_callback_
>
> --
> Philippe M. Chiasson   GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/     m/gozer\@(protected)/
>



--
Anthony R Fletcher    
Room 2033, Building 12A,     http://dcb.cit.nih.gov/~arif
National Institutes of Health, arif@(protected)
12A South Drive, Bethesda,    Phone: (+1) 301 402 1741.
MD 20892-5624, USA.
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.