[Catalyst] Catalyst::Engine problem

Sebastian Riedel sri at oook.de
Fri Mar 25 14:14:21 CET 2005


bsadler at helix-it.com wrote:

>Hi All,
>
>I've just been trying to set up catalyst for a new project.  Although 
>everything looks great, and works fine under the test server.pl setup, it 
>will not run under apache2/mod_perl2.
>
>I an error in my logs saying on line 440 of Catalyst::Engine that method debug 
>cannot be found in package Apache::RequestRec.
>
>I am running Mandrake 10.1 with Apache 2.0.50 (prefork), mod_perl 1.99.16, 
>mod_apreq2.04.03, and libapreq, perl-apreq packages of the same versions.
>
>I am using Catalyst version 4.34, and perl 5.8.5 multithreaded.
>
>After some debugging and determining that the $r argument to handler in 
>Catalyst::Engine is always null (or seems to be), I think it might have to do 
>with the fancy  *{"$class\::debug"} = sub { 1 };  not working properly in 
>Catalyst.pm, but in all honesty I have no idea what I am talking about at 
>this point.
>  
>
I guess

    sub handler {
        my ( $class, $r ) = @_;

should be

   sub handler ($$) {
       my ( $class, $r ) = @_;

in Engine.pm

I vaguely remember Perrin telling me that mod_perl needs a prototype 
when inheritance is involved.
If it works for you i'll add it to the next release.

--
sebastian



More information about the Catalyst mailing list