perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Rolsky <>
Subject method handlers broken in latest CVS?
Date Fri, 17 May 2002 20:57:18 GMT
I'm playing with the latest CVS version in order to make sure that Mason
will work with the backwards compatibility layer.

Defining a "sub handler : method" does not seem to be working.

If I do this:

sub handler : method
    my ($package, $r) = @_;

    my $ah = $AH || $package->make_ah();

    return $ah->handle_request($r);

and then in my config file I have:

PerlResponseHandler HTML::Mason::ApacheHandler

I get this error message:

     Error message:
Can't locate object method "" via package "HTML::Mason::ApacheHandler"
(perhaps you forgot to load "HTML::Mason::ApacheHandler"?).

Which is a bit bizarre.  If I get rid of the method attribute it seems to
work properly, but I need this to be a method handler.

Just for yucks I added this to the ApacheHandler module:

sub AUTOLOAD { warn Devel::StackTrace->new }

which got me this:

HTML::Mason::ApacheHandler::AUTOLOAD('HTML::Mason::ApacheHandler', 'Apache::RequestRec=SCALAR(0x83f8104)')
called at -e line 0
eval {...}('HTML::Mason::ApacheHandler', 'Apache::RequestRec=SCALAR(0x83f8104)') called at
-e line 0

I know that there's no guarantee that CVS will ever work, but I figured
I'd report it just in case anyone is interested.

FWIW, a non-method handler seems to work fine but then I get segfaults
later in the code when I call "$r->filename".

Also, it seems that Apache::compat needs to 'use Apache::ServerUtil' so
that the Apache->server method works.


we await the New Sun

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message