Stop psgi_file.t from recursing
Florian Ragwitz [Tue, 1 Mar 2011 14:38:40 +0000 (15:38 +0100)]
psgi_app is *not* to be used in .psgi files. It's the compat layer that'll give
you either an app loaded from from a .psgi file, or the default PSGI app with
the reverse proxy middleware and stuff.

In .psgi files only raw_psgi_app should ever be used, as that'll return the bare
catalyst psgi app to then be wrapped in middlewares manually.

I see how the naming is shit and confusing though. Suggestions welcome.

t/aggregate/psgi_file.t

index 8fd6ead..c7a0e36 100644 (file)
@@ -16,7 +16,7 @@ use strict;
 use warnings;
 use TestApp;
 
-TestApp->psgi_app;
+TestApp->raw_psgi_app;
 };
 close($psgi);
 # Check we wrote out something that compiles
@@ -37,7 +37,7 @@ my $failed = 0;
 eval {
     # Catch infinite recursion (or anything else)
     local $SIG{__WARN__} = sub { warn(@_); $failed = 1; die; };
-    TestApp->setup_psgi_app;
+    TestApp->psgi_app;
 };
 ok(!$@, 'No exception')
     or diag $@;