Keep our namespace a bit organized.
# Wrap old request handlers.
sub everything {
# Wrap old request handlers.
sub everything {
- require PLP::CGI;
- PLP::CGI::everything();
+ require PLP::Backend::CGI;
+ PLP::Backend::CGI::everything();
- require PLP::Apache;
- PLP::Apache::handler(@_);
+ require PLP::Backend::Apache;
+ PLP::Backend::Apache::handler(@_);
}
# Sends the headers waiting in %PLP::Script::header
}
# Sends the headers waiting in %PLP::Script::header
=head2 Lighttpd installation
=head2 Lighttpd installation
-F<lighttpd.conf> configuration using L<mod_fastcgi|PLP::FastCGI>:
+F<lighttpd.conf> configuration using L<mod_fastcgi|PLP::Backend::FastCGI>:
server.modules = (
"mod_fastcgi",
)
fastcgi.server = (
".plp" => ((
server.modules = (
"mod_fastcgi",
)
fastcgi.server = (
".plp" => ((
- "bin-path" => "/usr/bin/perl -MPLP::FastCGI",
+ "bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI",
"socket" => "/tmp/fcgi-plp.socket",
)),
)
=head2 Apache installation
"socket" => "/tmp/fcgi-plp.socket",
)),
)
=head2 Apache installation
-F<httpd.conf> for a L<mod_perl|PLP::Apache> setup:
+F<httpd.conf> for a L<mod_perl|PLP::Backend::Apache> setup:
<Files *.plp>
SetHandler perl-script
<Files *.plp>
SetHandler perl-script
- PerlHandler PLP::Apache
+ PerlHandler PLP::Backend::Apache
PerlSendHeader On
</Files>
PerlSendHeader On
</Files>
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
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::Apache> and L<FastCGI|PLP::FastCGI> for speeds comparable
-to those of PHP, but can also be run as a standard L<CGI|PLP::CGI> script.
+L<mod_perl|PLP::Backend::Apache> and L<FastCGI|PLP::Backend::FastCGI>
+for speeds comparable to those of PHP, but can also be run as a standard
+L<CGI|PLP::Backend::CGI> script.
-See either L<CGI|PLP::CGI>, L<FastCGI|PLP::FastCGI> or L<Apache|PLP::Apache>.
+See either L<CGI|PLP::Backend::CGI>, L<FastCGI|PLP::Backend::FastCGI>
+or L<Apache|PLP::Backend::Apache>.
At least the following servers are supported:
=over 10
=item Lighttpd
At least the following servers are supported:
=over 10
=item Lighttpd
-With L<mod_fastcgi|PLP::FastCGI> or L<mod_cgi|PLP::CGI>.
+With L<mod_fastcgi|PLP::Backend::FastCGI> or L<mod_cgi|PLP::Backend::CGI>.
=item Apache
Either version 1 or 2.
=item Apache
Either version 1 or 2.
-Using L<mod_perl|PLP::Apache>, L<mod_fastcgi, mod_fcgid|PLP::FastCGI>,
-or L<mod_action|PLP::CGI>.
+Using L<mod_perl|PLP::Backend::Apache>,
+L<mod_fastcgi, mod_fcgid|PLP::Backend::FastCGI>,
+or L<mod_action|PLP::Backend::CGI>.
+package PLP::Backend::Apache;
- $PLP::print = 'PLP::Apache::print';
+ $PLP::print = 'PLP::Backend::Apache::print';
$PLP::read = \&read;
$ENV{PLP_FILENAME} = my $filename = $r->filename;
$PLP::read = \&read;
$ENV{PLP_FILENAME} = my $filename = $r->filename;
-PLP::Apache - Apache mod_perl interface for PLP
+PLP::Backend::Apache - Apache mod_perl interface for PLP
<IfModule mod_perl.c>
<Files *.plp>
SetHandler perl-script
<IfModule mod_perl.c>
<Files *.plp>
SetHandler perl-script
- PerlHandler PLP::Apache
+ PerlHandler PLP::Backend::Apache
PerlSendHeader On
PerlSetVar PLPcache On
</Files>
PerlSendHeader On
PerlSetVar PLPcache On
</Files>
-L<PLP|PLP>, L<PLP::FastCGI|PLP::FastCGI>, L<mod_perl|Apache>
+L<PLP|PLP>, L<PLP::Backend::FastCGI|PLP::Backend::FastCGI>, L<mod_perl|Apache>
+package PLP::Backend::CGI;
$_[0]->init() and PLP::start();
}
$_[0]->init() and PLP::start();
}
-# This is run by the CGI script. (#!perl \n use PLP::CGI;)
+# This is run by the CGI script. (#!perl \n use PLP::Backend::CGI;)
sub import {
$_[0]->everything();
}
sub import {
$_[0]->everything();
}
-PLP::CGI - CGI interface for PLP
+PLP::Backend::CGI - CGI interface for PLP
Example F</foo/bar/plp.cgi>:
#!/usr/bin/perl
Example F</foo/bar/plp.cgi>:
#!/usr/bin/perl
Or install the C<plp.cgi> included with PLP.
Or install the C<plp.cgi> included with PLP.
-L<PLP|PLP>, L<PLP::FastCGI|PLP::FastCGI>
+L<PLP|PLP>, L<PLP::Backend::FastCGI|PLP::Backend::FastCGI>
+package PLP::Backend::FastCGI;
+use base 'PLP::Backend::CGI';
-PLP::FastCGI - FastCGI interface for PLP
+PLP::Backend::FastCGI - FastCGI interface for PLP
fastcgi.server = (
".plp" => ((
fastcgi.server = (
".plp" => ((
- "bin-path" => "/usr/bin/perl -MPLP::FastCGI",
+ "bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI",
"socket" => "/tmp/fcgi-plp.socket",
)),
)
"socket" => "/tmp/fcgi-plp.socket",
)),
)
Example F</foo/bar/plp.fcgi>:
#!/usr/bin/perl
Example F</foo/bar/plp.fcgi>:
#!/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_fastcgi> or I<mod_fcgid>, and setup F<httpd.conf>
(often just create a F</etc/apache2/conf.d/plp>) with:
-L<PLP|PLP>, L<PLP::CGI|PLP::CGI>, L<FCGI|FCGI>
+L<PLP|PLP>, L<PLP::Backend::CGI|PLP::Backend::CGI>, L<FCGI|FCGI>
# Executable to serve PLP scripts using CGI.
# Not installed automatically, and only needed for CGI installations.
# Executable to serve PLP scripts using CGI.
# Not installed automatically, and only needed for CGI installations.
# This is a dispatch script for FastCGI installations.
# It is not needed with normal CGI or mod_perl.
# This is a dispatch script for FastCGI installations.
# It is not needed with normal CGI or mod_perl.
+use PLP::Backend::FastCGI;