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\@(apache|cpan|ectoplasm)\.org/
>
--
Anthony R Fletcher
Room 2033, Building 12A, http://dcb.cit.nih.gov/~arif
National Institutes of Health, [EMAIL PROTECTED]
12A South Drive, Bethesda, Phone: (+1) 301 402 1741.
MD 20892-5624, USA.