perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <per...@elem.com>
Subject Re: Internal Server Error
Date Thu, 23 Aug 2007 17:35:43 GMT
On 8/21/07, Jeff Pang <pangj@earthlink.net> wrote:
> >PerlHandler Package::Name
> >
> >instead of:
> >
> >PerlHandler Package::Name->handler
> >
>
> So on the first case,we need to write the handler as
> sub handler { my $r = shift; ...}
> because Apache may call the function directly as Package::Name::handler.
>
> on the second case,we write handler as,
> sub handler { my $class = shift; my $r = shift; ... }
> because '->' is a method calling.

For method handlers, you also have to declare it differently.

In mod_perl 1:
sub handler ($$) {

In mod_perl 2:
sub handler : method {

- Perrin

Mime
View raw message