On Wed, 1 Feb 2006 13:29:24 +0100
"Len Kranendonk" <[EMAIL PROTECTED]> wrote:

> Hello all,
> 
> Suppose I have this:
> 
> PerlModule My::Module
> PerlChildInitHandler My::Module
> PerlOutputFilterHandler My::Module
> 
> In the sub handler {} , is there a way to determinate what type of
> handler I am supposed to be ? 
> 
> I'm running mod_perl2 for that matters.

  I haven't tested this under MP2, however it should work fine. Last
  time I ran into that situation I did this: 

  PerlModule My::Module 
  PerlChildInitHandler My::Module::init_hander()
  PerlOutputFilterHandler My::Module::output_filter_handler()

  Then you simply treat init_handler() and output_filter_handler()
  as your "handlers" for each of those phases. The only thing special
  about sub handler {} is that it is the default that is called by
  mod_perl as the entry point into your code.  

  You can also just pass an argument to your handle to key off of like:

  PerlModule My::Module 
  PerlChildInitHandler My::Module::handler('init')
  PerlOutputFilterHandler My::Module::handler('output_filter')

  Hope that helps! 

 ---------------------------------
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 ---------------------------------

Reply via email to