remove trailing whitespace
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Deployment / Apache / mod_perl.pod
index 4a37096..22da178 100644 (file)
@@ -4,15 +4,16 @@ Catalyst::Manual::Deployment::Apache::mod_perl - Deploying Catalyst with mod_per
 
 =head1 mod_perl Deployment
 
-mod_perl is not the best solution for many applications, but we'll list some
-pros and cons so you can decide for yourself.
+The recommended method of deploying Catalyst applications is FastCGI. In
+many cases, mod_perl is not the best solution, but we'll list some pros
+and cons so you can decide for yourself.
 
 =head2 Pros
 
 =head3 Speed
 
-mod_perl is fast and your app will be loaded in memory
-within each Apache process.
+mod_perl is fast, and your entire app will be loaded in memory within
+each Apache process.
 
 =head3 Shared memory for multiple apps
 
@@ -32,23 +33,25 @@ server.
 
 =head3 Reloading
 
-Any changes made to the core code of your app require a full Apache restart.
-Catalyst does not support Apache::Reload or StatINC.  This is another good
-reason to run a frontend web server where you can set up an
-C<ErrorDocument 502> page to report that your app is down for maintenance.
+Any changes made to the code of your app require a full restart of
+Apache. Catalyst does not support Apache::Reload or StatINC. This is
+another good reason to run a frontend web server where you can set up an
+C<ErrorDocument 502> page to report that your app is down for
+maintenance.
 
 =head4 Cannot run multiple versions of the same app
 
 It is not possible to run two different versions of the same application in
 the same Apache instance because the namespaces will collide.
 
-=head3 Cannot run different versions of libraries.
+=head3 Cannot run different versions of libraries
 
 If you have two different applications which run on the same machine,
-which need two different versions of a library then the only way to do
-this is to have per-vhost perl interpreters (with different library paths).
-This is entirely possible, but nullifies all the memory sharing benefits that
-you get from having multiple applications sharing the same interpreter.
+and each application needs a different versions of a library, the only
+way to do this is to have per-vhost perl interpreters (with different
+library paths). This is entirely possible, but nullifies all the memory
+sharing benefits that you get from having multiple applications sharing
+the same interpreter.
 
 =head1 Setup
 
@@ -58,12 +61,11 @@ to run a Catalyst app.
 =head2 2. Install Apache with mod_perl
 
 Both Apache 1.3 and Apache 2 are supported, although Apache 2 is highly
-recommended.  Apache 1.3 will no longer be supported with Catalyst 5.9.  With
-Apache 2, make sure you are using the prefork MPM and not the worker MPM.  The
-reason for this is that many Perl modules are not thread-safe and may have
-problems running within the threaded worker environment.  Catalyst is
-thread-safe however, so if you know what you're doing, you may be able to run
-using worker.
+recommended.  With Apache 2, make sure you are using the prefork MPM and not
+the worker MPM.  The reason for this is that many Perl modules are not
+thread-safe and may have problems running within the threaded worker
+environment.  Catalyst is thread-safe however, so if you know what you're
+doing, you may be able to run using worker.
 
 In Debian, the following commands should get you going.
 
@@ -90,9 +92,23 @@ controller, model, and view classes and configuration.  If you have -Debug
 mode enabled, you will see the startup output scroll by when you first
 start Apache.
 
+Also, there have been reports that the block above should instead be (but
+this has not been confirmed):
+
+    <Perl>
+        use lib '/var/www/MyApp/lib';
+        use MyApp;
+    </Perl>
+
+    <Location />
+        SetHandler          modperl
+        PerlResponseHandler MyApp
+    </Location>
+
 For an example Apache 1.3 configuration, please see the documentation for
 L<Catalyst::Engine::Apache::MP13>.
 
+
 =head2 Test It
 
 That's it, your app is now a full-fledged mod_perl application!  Try it out