X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FPSGI.pod;h=a05e0023bbe4518005b457c2c6917853feeeeb2f;hp=b12b76b271053c71d07aa07e134e7888882a1655;hb=b007fcc611c8584b634e27a60ebfe5b6f518601a;hpb=e60068484721132e6fe1855f53f9542d8bb17a35 diff --git a/lib/Catalyst/PSGI.pod b/lib/Catalyst/PSGI.pod index b12b76b..a05e002 100644 --- a/lib/Catalyst/PSGI.pod +++ b/lib/Catalyst/PSGI.pod @@ -9,9 +9,8 @@ Catalyst::PSGI - How Catalyst and PSGI work together The L specification defines an interface between web servers and Perl-based web applications and frameworks. It supports the writing of portable applications that can be run using various methods (as a -standalone server, or using mod_perl, FastCGI, etc.). L is a set -of middleware tools for running Perl applications compatible with the -PSGI specification. +standalone server, or using mod_perl, FastCGI, etc.). L is an +implementation of the PSGI specification for running Perl applications. Catalyst used to contain an entire set of C<< Catalyst::Engine::XXXX >> classes to handle various web servers and environments (e.g. CGI, @@ -53,7 +52,7 @@ The simplest C<.psgi> file for an application called C would be: use warnings; use TestApp; - my $app = sub { TestApp->psgi_app(@_) }; + my $app = TestApp->psgi_app(@_); Note that Catalyst will apply a number of middleware components for you automatically, and these B be applied if you manually create a @@ -64,8 +63,8 @@ L =head2 What is in the .psgi file Catalyst generates by default? -Catalyst generates an application which, if the C<< using_frontend_proxy ->> setting is on, is wrapped in L, and +Catalyst generates an application which, if the C +setting is on, is wrapped in L, and contains some engine-specific fixes for uniform behaviour, as contained in: @@ -75,8 +74,6 @@ in: =item L -=item nginx - local to Catalyst - =back If you override the default by providing your own C<< .psgi >> file, @@ -89,6 +86,15 @@ An apply_default_middlewares method is supplied to wrap your application in the default middlewares if you want this behaviour and you are providing your own .psgi file. +This means that the auto-generated (no .psgi file) code looks something +like this: + + use strict; + use warnings; + use TestApp; + + my $app = TestApp->apply_default_middlewares(TestApp->psgi_app(@_)); + =head1 SEE ALSO L, L, L, L.