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.
use warnings;
use TestApp;
-TestApp->psgi_app;
+TestApp->raw_psgi_app;
};
close($psgi);
# Check we wrote out something that compiles
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 $@;