Tim Noll wrote: > Is there a proper way to call a method handler using either push_handlers or > set_handlers? They both appear to call all handler refs just like normal > subs, with no class name passed in. It appears that enclosing the handler in > an anonymous sub is a workaround, but I was wondering if there was a better > solution. > > # does not call handler as a method > $r->push_handlers( PerlHandler => \&Apache::Test::handler ); > > # does call handler as a method > $r->push_handlers( PerlHandler => sub { Apache::Test->handler } ); > > -Tim >
See http://perl.apache.org/guide/config.html#Perl_Method_Handlers, the eagle and cookbook books. PERL_METHOD_HANDLERS=1 + $$ prototype for Apache::Test::handler -- _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/