Catalyst applications give optimum performance when run under mod_perl.
However sometimes mod_perl is not an option, and running under CGI is
-just too slow. There are two alternatives to mod_perl that give
-reasonable performance: FastCGI and PersistentPerl.
+just too slow. There's also an alternatives to mod_perl that gives
+reasonable performance named FastCGI.
B<Using FastCGI>
For more information see the FastCGI documentation, the C<FCGI> module
and L<http://www.fastcgi.com/>.
-
-B<PersistentPerl>
-
-PersistentPerl (previously known as C<CGI::SpeedyCGI>) is a persistent
-Perl interpreter. After the script is initially run, instead of
-exiting, the perl interpreter is kept running. During subsequent runs,
-this interpreter is used to handle new executions instead of starting
-a new perl interpreter each time. A very fast frontend program contacts
-the persistent Perl process, which is usually already running, to do
-the work and return the results.
-PersistentPerl can be used to speed up perl CGI scripts. It also
-provides an Apache module so that scripts can be run without the
-overhead of doing a fork/exec for each request.
-
-The code for PersistentPerl is simpler than for FastCGI; rather than
-waiting in an accept loop the script runs to completion, however
-variables are not reinitialized on subsequent runs but maintain their
-values from the previous run.
-
-
- #!/usr/bin/perperl
- use strict;
- use vars qw($output $initialized);
- use PersistentPerl;
- use MyApp;
-
- if (!$initialized++) {
- # initialization code - set up database, etc
- if ($PersistentPerl::i_am_per_perl) {
- # PP-specific initialization code
- }
- }
-
- MyApp->run;
-
-For more information see the C<PersistentPerl> documentation.
-
-
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>