From: Tomas Doran Date: Mon, 22 Aug 2011 20:13:20 +0000 (+0100) Subject: I think this fixes mod_perl for some cases X-Git-Tag: 5.90002~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=72ff406f1fb52fe241df291767a2f19a016205d0 I think this fixes mod_perl for some cases --- diff --git a/lib/Catalyst/EngineLoader.pm b/lib/Catalyst/EngineLoader.pm index 36cf016..e4d4c81 100644 --- a/lib/Catalyst/EngineLoader.pm +++ b/lib/Catalyst/EngineLoader.pm @@ -63,31 +63,29 @@ EOW around guess => sub { my ($orig, $self) = (shift, shift); my $engine = $self->$orig(@_); - if ($engine eq 'Standalone') { - if ( $ENV{MOD_PERL} ) { - my ( $software, $version ) = - $ENV{MOD_PERL} =~ /^(\S+)\/(\d+(?:[\.\_]\d+)+)/; - $version =~ s/_//g; - $version =~ s/(\.[^.]+)\./$1/g; - - if ( $software eq 'mod_perl' ) { - if ( $version >= 1.99922 ) { - $engine = 'Apache2'; - } - - elsif ( $version >= 1.9901 ) { - Catalyst::Exception->throw( message => 'Plack does not have a mod_perl 1.99 handler' ); - $engine = 'Apache2::MP19'; - } - - elsif ( $version >= 1.24 ) { - $engine = 'Apache1'; - } - - else { - Catalyst::Exception->throw( message => - qq/Unsupported mod_perl version: $ENV{MOD_PERL}/ ); - } + if ( $ENV{MOD_PERL} ) { + my ( $software, $version ) = + $ENV{MOD_PERL} =~ /^(\S+)\/(\d+(?:[\.\_]\d+)+)/; + $version =~ s/_//g; + $version =~ s/(\.[^.]+)\./$1/g; + + if ( $software eq 'mod_perl' ) { + if ( $version >= 1.99922 ) { + $engine = 'Apache2'; + } + + elsif ( $version >= 1.9901 ) { + Catalyst::Exception->throw( message => 'Plack does not have a mod_perl 1.99 handler' ); + $engine = 'Apache2::MP19'; + } + + elsif ( $version >= 1.24 ) { + $engine = 'Apache1'; + } + + else { + Catalyst::Exception->throw( message => + qq/Unsupported mod_perl version: $ENV{MOD_PERL}/ ); } } }