if ($engine eq 'Standalone') {
if ( $ENV{MOD_PERL} ) {
my ( $software, $version ) =
- $ENV{MOD_PERL} =~ /^(\S+)\/(\d+(?:[\.\_]\d+)+)/;
-
+ $ENV{MOD_PERL} =~ /^(\S+)\/(\d+(?:[\.\_]\d+)+)/;
$version =~ s/_//g;
+ $version =~ s/(\.[^.]+)\./$1/g;
+
if ( $software eq 'mod_perl' ) {
if ( $version >= 1.99922 ) {
$engine = 'Apache2';
}
}
}
+
return $engine;
};
__PACKAGE__->meta->make_immutable( inline_constructor => 0 );
+
1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Engine::Loader - The Catalyst Engine Loader
+
+=head1 SYNOPSIS
+
+See L<Catalyst>.
+
+=head1 DESCRIPTION
+
+Wrapper on L<Plack::Loader> which resets the ::Engine if you are using some
+version of mod_perl.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut