On 9/16/05, Peter Speltz <[EMAIL PROTECTED]> wrote:
> On 9/15/05, David Baird <[EMAIL PROTECTED]> wrote:
> > Maypole::setup() has this:
> >
> > # Naughty.
> > *{ $calling_class . "::handler" } =
> > sub { Maypole::handler( $calling_class, @_ ) };
> >
> > Why is this necessary? $calling_class is the application, which
> > already inherits from Maypole.
> >
>
> At first I was going to say to safeguard users from messing things up
> by defining a handler sub. But it looks like it is so the $r object
> in @_ is passed is available and not just the class. I commented it
> out and the request could not run. It is really beyond my
> understanding now and i could be totally wrong. I am curious though.
>
I get it. handler() is being called as a function, not as a method, so
it needs to be defined in the package it's called on, because
functions aren't inherited.
d.
-------------------------------------------------------
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