[Catalyst-commits] r13409 - in
Catalyst-Runtime/5.80/branches/psgi/lib: . Catalyst/Engine
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Fri Jul 16 15:18:59 GMT 2010
Author: jnapiorkowski
Date: 2010-07-16 16:18:58 +0100 (Fri, 16 Jul 2010)
New Revision: 13409
Modified:
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine/Loader.pm
Log:
drop version.pm and minor refactor of injected handler
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine/Loader.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine/Loader.pm 2010-07-15 15:19:07 UTC (rev 13408)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine/Loader.pm 2010-07-16 15:18:58 UTC (rev 13409)
@@ -11,9 +11,10 @@
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;
- $version =~ s/_//g;
if ( $software eq 'mod_perl' ) {
if ( $version >= 1.99922 ) {
$engine = 'Apache2';
@@ -35,6 +36,7 @@
}
}
}
+
return $engine;
};
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm 2010-07-15 15:19:07 UTC (rev 13408)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm 2010-07-16 15:18:58 UTC (rev 13409)
@@ -2594,12 +2594,13 @@
}
if ($ENV{MOD_PERL}) {
+ use Catalyst::Engine::Loader;
+ my $apache = Catalyst::Engine::Loader->auto;
# FIXME - Immutable
$class->meta->add_method(handler => sub {
my $r = shift;
my $app = $class->psgi_app;
- use Plack::Handler::Apache2;
- Plack::Handler::Apache2->call_app($r, $app);
+ $apache->call_app($r, $app);
});
}
More information about the Catalyst-commits
mailing list