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

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Tue Jan 25 14:50:11 GMT 2011


Author: jnapiorkowski
Date: 2011-01-25 14:50:11 +0000 (Tue, 25 Jan 2011)
New Revision: 13932

Modified:
   Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Upgrading.pod
Log:
added Engine::PSGI instructions

Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Upgrading.pod
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Upgrading.pod	2011-01-25 00:42:39 UTC (rev 13931)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Upgrading.pod	2011-01-25 14:50:11 UTC (rev 13932)
@@ -53,11 +53,9 @@
 
 =head2 Upgrading the CGI Engine
 
-If you were using L<Catalyst::Engine::CGI> you should now use...
+If you were using L<Catalyst::Engine::CGI> there is no upgrade needed if your
+myapp_cgi.pl script is already upgraded enough to use L<Catalyst::Script::CGI>.
 
-No upgrade needed if your myapp_cgi.pl script is already upgraded
-enough to use L<Catalyst::Script::CGI>.
-
 =head2 Upgrading the Preforking Engine
 
 If you were using L<Catalyst::Engine::HTTP::Prefork> then L<Starman>
@@ -66,8 +64,35 @@
 =head2 Upgrading the PSGI Engine
 
 If you were using L<Catalyst::Engine::PSGI> this new release supercedes this
-engine in supporting L<Plack>. You should remove the.. FIXME
+engine in supporting L<Plack>. By default the Engine is now always L<Plack>.
+As a result, you can stop depending on L<Catalyst::Engine::PSGI> in your
+C<Makefile.PL>.  Additionally, if you have an C<app.psgi> script you no longer
+need to specify the PSGI engine.  Instead, the L<Catalyst> application class
+now has a new method C<psgi_app> which returns a L<Plack> compatible coderef.
 
+For example, if you were using L<Catalyst::Engine::PSGI> in the past, you may
+have written an C<app.psgi> file similar to this one:
+
+    use Plack::Builder;
+    use MyCatalytApp;
+
+    MyCatalystApp->setup_engine('PSGI');
+
+    builder {
+        enable ... # enable your desired middleware
+        sub { MyCatalystApp->run(@_) };
+    };
+
+Instead, you now just do
+
+    use Plack::Builder;
+    use MyCatalystApp;
+
+    builder {
+        enable ... #enable your desired middleware
+        MyCatalystApp->psgi_app;
+    };
+
 =head2 Engines with unknown status
 
 The following engines have untested or unknown compatibility.  Reports are




More information about the Catalyst-commits mailing list