[Catalyst-commits] r13773 - Catalyst-Runtime/5.80/branches/psgi/lib

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sun Dec 5 17:29:13 GMT 2010


Author: rafl
Date: 2010-12-05 17:29:13 +0000 (Sun, 05 Dec 2010)
New Revision: 13773

Modified:
   Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
Log:
Set up MyApp->psgi_app lazily

This fixes the double inclusion through .psgi -> setup_psgi_app -> .psgi when
running with plackup.

Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm	2010-12-05 15:05:16 UTC (rev 13772)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm	2010-12-05 17:29:13 UTC (rev 13773)
@@ -71,7 +71,7 @@
 __PACKAGE__->mk_classdata($_)
   for qw/components arguments dispatcher engine log dispatcher_class
   engine_class context_class request_class response_class stats_class
-  setup_finished psgi_app/;
+  setup_finished/;
 
 __PACKAGE__->dispatcher_class('Catalyst::Dispatcher');
 __PACKAGE__->engine_class('Catalyst::Engine');
@@ -2645,11 +2645,14 @@
 
     $class->engine( $engine->new );
 
-    $class->psgi_app( $class->setup_psgi_app );
-
     return;
 }
 
+sub psgi_app {
+    my ($app) = @_;
+    $app->setup_psgi_app;
+}
+
 =head2 $c->setup_psgi_app
 
 Builds a PSGI application coderef for the catalyst application C<$c>.




More information about the Catalyst-commits mailing list