> My question was really about the proper way to call method handlers from > either push_handlers or set_handlers since the normal technique (first > example above) calls them as normal subs, i.e. the first parameter is not > the class name. The second example, however, seems to do the trick. I just > wanted to know whether there was a better technique and/or any pitfalls to > this technique. While searching around the web a bit more today, I came > across the example below from the mod_perl_method_handlers man page, which > seems to be similar, so I guess I'm on the right track. However, any > comments would still be appreciated. > > <snip> > $r->push_handlers(PerlHandler => > sub { > my $r = shift; > $self->perl_handler_method($r); > } > ); > </snip> >
you need to push the handler by name $r->push_handlers(PerlHandler => 'My::Handler'); at least until this patch makes it into mod_perl core... http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101164617829467&w=2 (though I forgot what the patch was for :) at any rate, see the latter part of recipe 10.3 :) --Geoff