PLP is yet another Perl embedder, primarily for HTML documents. Unlike with
other Perl embedders, there is no need to learn a meta-syntax or object
model: one can just use the normal Perl constructs. PLP runs under
-L<mod_perl|PLP::Backend::Apache> and L<FastCGI|PLP::Backend::FastCGI>
+L<FastCGI|PLP::Backend::FastCGI> and L<mod_perl|PLP::Backend::Apache>
for speeds comparable to those of PHP, but can also be run as a standard
L<CGI|PLP::Backend::CGI> script.
=head2 Setup
-See either L<CGI|PLP::Backend::CGI>, L<FastCGI|PLP::Backend::FastCGI>
+See either
+L<CGI|PLP::Backend::CGI>,
+L<FastCGI|PLP::Backend::FastCGI> (recommended)
or L<Apache|PLP::Backend::Apache>.
At least the following servers are supported:
=item Apache
-Either version 1 or 2.
-Using L<mod_perl|PLP::Backend::Apache>,
-L<mod_fastcgi, mod_fcgid|PLP::Backend::FastCGI>,
+Either version 1 or 2. Using
+L<mod_fcgid, mod_fastcgi|PLP::Backend::FastCGI>,
+L<mod_perl|PLP::Backend::Apache>,
or L<mod_action|PLP::Backend::CGI>.
=back
apache-modconf apache enable mod_perl
-Setup F<httpd.conf> (often just create a F</etc/apache2/conf.d/plp>) with:
+Setup F<httpd.conf> (in new installs just create F</etc/apache/conf.d/plp>) with:
<IfModule mod_perl.c>
<Files *.plp>
SetHandler perl-script
PerlHandler PLP::Backend::Apache
PerlSendHeader On
- PerlSetVar PLPcache On
</Files>
</IfModule>
=head1 DESCRIPTION
-=head2 PerlSetVar configuration directives
+=head2 Configuration directives
+
+PLP behaviour can be configured by B<PerlSetVar> rules.
+These can be added to a F<.htaccess> file or most any scope of server
+configuration. For example, to disable caching for a specific site:
+
+ <Directory /var/www/somesite/>
+ PerlSetVar PLPcache Off
+ </Directory>
=over 16
=item PLPcache
-Sets caching B<On>/B<Off>. When caching, PLP saves your script in memory and
-doesn't re-read and re-parse it if it hasn't changed. PLP will use more memory,
+Sets caching B<On>/B<Off>.
+When caching, PLP saves your script in memory and doesn't re-read
+and re-parse it if it hasn't changed. PLP will use more memory,
but will also run 50% faster.
B<On> is default, anything that isn't =~ /^off$/i is considered On.
=back
+=head1 BUGS
+
+With mod_perlB<2>, any new request will change the cwd for all processes.
+This means that if you're running files from multiple directories,
+you I<should not use the current path> for it may change at any time.
+
+The bug has been confirmed with at least mod_perl 2.0.2/3/4 on Apache 2.2.3/8.
+Using this backend on Apache2 is extremely discouraged until this is fixed.
+Instead, L<the FastCGI backend|PLP::Backend::FastCGI> is recommended.
+
+Apache1 does not show any problems.
+
=head1 AUTHOR
Mischa POSLAWSKY <perl@shiar.org>
=head2 Apache
-Enable I<mod_actions> and setup F<httpd.conf>
-(often just create a F</etc/apache2/conf.d/plp>) with:
+Enable I<mod_actions> and
+setup F<httpd.conf> (in new installs just create F</etc/apache/conf.d/plp>) with:
<IfModule mod_actions.c>
ScriptAlias /PLP_COMMON/ /foo/bar/
#!/usr/bin/perl
use PLP::Backend::FastCGI;
-Then enable either I<mod_fastcgi> or I<mod_fcgid>, and setup F<httpd.conf>
-(often just create a F</etc/apache2/conf.d/plp>) with:
+Then enable either I<mod_fcgid> (recommended) or I<mod_fastcgi>, and
+setup F<httpd.conf> (in new installs just create F</etc/apache/conf.d/plp>) with:
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script plp
FCGIWrapper /foo/bar/plp.fcgi .plp
</IfModule>
+=head1 DESCRIPTION
+
+This is usually the preferred backend, providing persistent processes
+for speeds comparable to L<mod_perl|PLP::Backend::Apache> and
+reliability closer to L<CGI|PLP::Backend::CGI>.
+
+Servers often feature auto-adjusting number of daemons, script timeouts,
+and occasional restarts.
+
+=head2 Configuration directives
+
+PLP behaviour can be configured by setting environment variables.
+
+=over 16
+
+=item PLP_CACHE
+
+Sets caching off if false (0 or empty), on otherwise (true or undefined).
+When caching, PLP saves your script in memory and doesn't re-read
+and re-parse it if it hasn't changed. PLP will use more memory,
+but will also run 50% faster.
+
+=back
+
=head1 AUTHOR
Mischa POSLAWSKY <perl@shiar.org>