Fix merging mistake made in r13761
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / Loader.pm
index bb23841..026a07c 100644 (file)
@@ -11,9 +11,10 @@ around guess => sub {
     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';
@@ -35,8 +36,36 @@ around guess => sub {
             }
         }
     }
+
     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