[Catalyst] ModPerl 1.99 problem

Marcello m.romani at spinsoft.it
Tue Jun 7 14:16:30 CEST 2005


Marcello ha scritto:
> Hi,
>     I'm trying to make a simple Catalyst app run under 
> apache-2.0.54/mod_perl-1.999.21 (WinXP SP2, activePerl 5.8.6, build 811)
> The error log file reports:
> 
> Can't locate object method "boot" via package mod_perl at 
> C:/Perl/site/lib/Apache/Constants.pm line 8.\n
> 
> Somewhere the mod_perl 1 module Apache::Constants is being loaded, but I 
> can't find where (grep -R 'Apache::Constants' C:/Perl/site' doesn't show 
> anything wrong).
> 
> I've searched around the net and in the docs, but I can't find solution 
> to this.
> The app runs fine using Catalyst's test server (i.e. <app_name>_server.pl)
> The framework loads the MP19 engine (this is correct); I've also tried 
> to specify the MP20 engine, using the -Engine option, but that didn't 
> change anything.
> 
> I guess I'm doing some stupid mistake, but I can't find out what.
> 
> Can anyone help me ?
> 
> Thanks in advance
> 
> Marcello
> 
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
> 

I think the problem comes from CGI::Cookie, which can only differentiate 
between mod_perl 1 and mod_perl 2.
I think the relevant lines are:

      23 # Turn on special checking for Doug MacEachern's modperl
      24 my $MOD_PERL = 0;
      25 if (exists $ENV{MOD_PERL}) {
      26   if ($ENV{MOD_PERL_API_VERSION} == 2) {
      27       $MOD_PERL = 2;
      28       require Apache2::RequestUtil;
      29       require APR::Table;
      30   } else {
      31     $MOD_PERL = 1;
      32     require Apache;
      33   }
      34 }

Replacing lines 31, 32 with:

$MOD_PERL = 2;
require Apache2;
require Apache::RequestUtil;
require APR::Table;

the error goes away but another one kicks in:

Insecure dependency in eval while running with -T switch at 
C:/Perl/site/lib/UNIVERSAL/require.pm line 97.

Marcello



More information about the Catalyst mailing list