Stephen wrote:

[...]

The intent was to create a handler()
routine suitable for both mod_perl 1 and 2 (prototype of ($$) vs attribute
of : method). However, for some reason or another, handler() was being
called as a regular sub, with one parameter.

I have used the technique documented here: http://perl.apache.org/docs/2.0/user/porting/porting.html#Method_Handlers

which in short words comes to:

  sub handler_mp1 ($$)     { &mp1 }
  sub handler_mp2 : method { &mp2 }
  *handler = MP2 ? \&handler_mp2 : \&handler_mp1;

One thing I forgot to mention, is that : method won't work with perl < 5.6.

So if you can share your solution, I'd it to that section.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to