perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Gormley <cl...@traveljury.com >
Subject Re: SetHandlers question, Phase II
Date Wed, 15 Oct 2008 07:36:41 GMT

>      $r->set_handlers(PerlFixupHandler => \{$_[0]->handler('modperl')});

> The funny thing is, the way I understand that code above is to mean :
> "take a reference to the piece of code between the curly brackets, and 
> pass that code reference as the 2d argument to $r->set_handlers()".
> But the error message seems to indicate that perl is actually trying to 
> execute "$_[0]->handler()" at that point, no ?
> 

Actually, this code takes a reference to the value returned when you run
the code between the curlies.


What I can't figure out is why it works at all in one of your systems :)

I think you're wanting:

     $r->set_handlers(PerlFixupHandler => sub {$_[0]->handler('modperl')});

hth

Clint



Mime
View raw message