On 9/16/05, Dave Howorth <[EMAIL PROTECTED]> wrote: > As you all know, I know nothing about mod_perl but I was curious, so I > did a quick Google. According to <http://modperlbook.org/html/ch25_01.html>: > > ============= > > 25.1.5. Method Handlers > > In mod_perl 1.0, method handlers had to be specified by using the ($$) > prototype: > > package Eagle; > @ISA = qw(Bird); > > sub handler ($$) { > my($class, $r) = @_; > ...; > } > > Starting with Perl Version 5.6, you can use subroutine attributes, and > that's what mod_perl 2.0 does instead of conventional prototypes: > > package Eagle; > @ISA = qw(Bird); > > sub handler : method { > my($class, $r) = @_; > ...; > } > > See the attributes manpage. > > mod_perl 2.0 doesn't support the ($$) prototypes, mainly because several > callbacks in 2.0 have more arguments than $r, so the ($$) prototype > doesn't make sense any more. Therefore, if you want your code to work > with both mod_perl generations, you should use the subroutine attributes. > > ============ > > If I interpret this correctly, we should delete the naughty code > altogether, add the method attribute to Maypole::handler() and > EverythingWillJustWork.
I'm afraid I don't use mod_perl 2 yet but I am fairly familiar with mod_perl 1.x Does mod_perl 1.x really DTRT WRT :method attributes? Also we need to find out what fast_cgi would do as well. cheers, Aaron. ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Maypole-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maypole-devel
