On 9/16/05, David Baird <[EMAIL PROTECTED]> wrote:
> On 9/16/05, Dave Howorth <[EMAIL PROTECTED]> wrote:
> > David Baird wrote:
> > > It's compiled in by default AFAIK. You just need to prototype the
> > > handler method to switch it on. So if Maypole::handler was prototyped
> > > as ($$), mod_perl would call it as a method and we wouldn't need the
> > > naughtiness.
> > >
> > > However, I suspect this would break Maypole under CGI, because there
> > > is no parameter in the handler call. The prototype would need to be
> > > ($;$). And I'm guessing that prototype would *not* invoke mod_perl's
> > > method handler behaviour, and we're back to needing something naughty.
> >
> > If everything else works, we could just add a dummy parameter to the
> > handler() call in CGI::Maypole.
> >
> > Together with a comment! Perhaps something a little more explicit than
> > Simon C's:
> >
> > # Interface consistency is a Good Thing
> >
>
> Or something like this in setup():
>
> # translate the (non-inheritable) function call on handler(),
> # into a method call that inherits from Maypole::run_handler
> *{"$class\::handler"} = sub { $class->_run_handler( @_ ) };
>
> and rename Maypole::handler to _run_handler().
I like this suggestion it is less of a hack and less tied to mod_perl.
Something we need to think about is adding Maypole::FastCGI - it may
'just work' with the CGI version but it would be good to provide
Maypole with decent FastCGI compatibility.
Cheers,
A.
-------------------------------------------------------
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