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/
signature.asc
Description: OpenPGP digital signature
