works but totally wrong
John Napiorkowski [Thu, 15 Jul 2010 15:19:07 +0000 (15:19 +0000)]
lib/Catalyst.pm

index d864126..1b3dfaf 100644 (file)
@@ -2595,11 +2595,17 @@ sub setup_engine {
 
     if ($ENV{MOD_PERL}) {
         # FIXME - Immutable
-        $class->meta->add_method(handler => sub { shift->handle_request(@_) });
+        $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);
+        });
     }
 
     $class->engine( $engine->new );
     $class->psgi_app( $class->engine->build_psgi_app($class) );
+
 }
 
 =head2 $c->setup_home