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

Michael Reece mreece at sacbee.com
Tue Mar 29 01:11:48 CEST 2005


Also, to follow up on my initial reasons for testing, Catalyst appears to
behave wonderfully with multiple applications.

Now to try to get Catalyst to mimic much of what Maypole does ..

On 3/28/05 2:25 PM, "Michael Reece" <mreece at sacbee.com> wrote:

> Reading a recent, somewhat related thread on the mailing list archives, I
> saw the suggestion to change it to "sub handler ($$) {"
> 
> I made this change at line 796 in Catalyst/Engine.pm, and it solved my
> problem.
> 
> 
> On 3/28/05 1:48 PM, "Michael Reece" <mreece at sacbee.com> wrote:
> 
>> 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?
>> 
>> 
>> _______________________________________________
>> Catalyst mailing list
>> Catalyst at lists.rawmode.org
>> http://lists.rawmode.org/mailman/listinfo/catalyst
>> 

-- 
michael reece :: web engineer :: mreece at sacbee.com :: (916)321-1249





More information about the Catalyst mailing list