[Catalyst] Using other Modules

Jonathan Rockway jon at jrock.us
Sat Jun 2 09:47:14 GMT 2007


On Friday 01 June 2007 04:56:59 am Sven Eppler wrote:
> But dispatching the App this way, will create a situation that the app
> starts even if the module is not present on the deployment machine. But at
> the moment if somebody tries to add a new User, the application crashes
> complaining about not finding the module.

You must be doing something odd.  The application should not start if the 
module is not found.

Given:

    package Angerwhale::Controller::Foo;
    use strict;
    use warnings;
    use base 'Catalyst::Controller';
    
    use Not::Here;
    
    1;

in my app, I get:

    $ perl script/angerwhale_server.pl
    Can't locate Not/Here.pm in @INC (@INC 
contains: /home/jon/projects/angerwhale/script/../lib /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 .) 
at /home/jon/projects/angerwhale/script/../lib/Angerwhale/Controller/Foo.pm 
line 8.
    BEGIN failed--compilation aborted 
at /home/jon/projects/angerwhale/script/../lib/Angerwhale/Controller/Foo.pm 
line 8.
    Compilation failed in require at (eval 209) line 3.
    Compilation failed in require at script/angerwhale_server.pl line 57.

What are you doing differently?  Please show us your code.

Also, you might be interested in PAR deployment:

http://www.catalystframework.org/calendar/2006/4

Regards,
Jonthan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070602/a1514d29/attachment.pgp


More information about the Catalyst mailing list