[Catalyst] mod_perl -- Undefined subroutine &MyApp::handler

Michael Reece mreece at sacbee.com
Mon Mar 28 23:48:10 CEST 2005


Greetings.

I am testing out Catalyst as an alternative to Maypole (specifically
MasonX::Maypole).  My major gripe about Maypole and MXM is that it shares
config data across applications and I have not been able to reconcile all
the issues in order to run multiple apps on the same mod_perl apache
(Apache/1.3.27).

So I created a small test app, using Catalyst and C::M::CDBI::CRUD.

It runs fine as ./scripts/server.pl but I get an error trying to run it
under mod_perl.

In httpd.conf I have:

<Location /cswami2>
    <Perl>
    use lib '/usr/local/apache_perl/packages/CSwami2/lib';
    </Perl>
    SetHandler perl-script
    PerlHandler CSwami2
</Location>


In the error log, I get:

[Mon Mar 28 13:47:40 2005] [catalyst] [debug] Debug messages enabled
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] Loaded plugin
"Catalyst::Plugin::FormValidator"
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] Loaded engine
"Catalyst::Engine::Apache"
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] Loaded tables [snip]
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] Initialized components [snip]
[Mon Mar 28 13:47:40 2005] [catalyst] [info] CSwami2 powered by Catalyst
4.34
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] "CSwami2" defined "test" as
"CODE(0x886fa98)"
[Mon Mar 28 13:47:40 2005] [catalyst] [debug] "CSwami2" defined "!default"
as "CODE(0x86ce6b0)"
[Mon Mar 28 13:47:40 2005] [error] Undefined subroutine &CSwami2::handler
called.

CSwami2.pm has:
package CSwami2;
use Catalyst qw/-Debug FormValidator/;


Any ideas?




More information about the Catalyst mailing list