move backend interface modules into PLP::Backend:: namespace
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 22 Mar 2008 14:47:33 +0000 (14:47 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Mar 2008 06:56:38 +0000 (06:56 +0000)
Keep our namespace a bit organized.

PLP.pm
PLP/Backend/Apache.pm [moved from PLP/Apache.pm with 90% similarity]
PLP/Backend/CGI.pm [moved from PLP/CGI.pm with 91% similarity]
PLP/Backend/FastCGI.pm [moved from PLP/FastCGI.pm with 79% similarity]
plp.cgi
plp.fcgi

diff --git a/PLP.pm b/PLP.pm
index e5988c6e1da767c52cb045ef0c1bcd77db8fdbf4..e7ec30c5c8a227515cb0f215d63533c84728ba33 100644 (file)
--- a/PLP.pm
+++ b/PLP.pm
@@ -81,12 +81,12 @@ sub error {
 
 # 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();
 }
 sub handler {
 }
 sub handler {
-       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
@@ -258,25 +258,25 @@ PLP - Perl in HTML pages
 
 =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>
 
@@ -293,25 +293,28 @@ F<httpd.conf> for a L<mod_perl|PLP::Apache> setup:
 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.
 
 =head2 Setup
 
 
 =head2 Setup
 
-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>.
 
 =back
 
 
 =back
 
similarity index 90%
rename from PLP/Apache.pm
rename to PLP/Backend/Apache.pm
index 835f2b4c82ac6e64eed361f1f680b3729f5dd96a..94d38bf9cbaf0fe014c2384ce6265f608956d359 100644 (file)
@@ -1,4 +1,4 @@
-package PLP::Apache;
+package PLP::Backend::Apache;
 
 use strict;
 
 
 use strict;
 
@@ -30,7 +30,7 @@ our $r;
 sub init {
        $r = shift;
 
 sub init {
        $r = shift;
 
-       $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;
@@ -84,7 +84,7 @@ sub handler {
 
 =head1 NAME
 
 
 =head1 NAME
 
-PLP::Apache - Apache mod_perl interface for PLP
+PLP::Backend::Apache - Apache mod_perl interface for PLP
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
@@ -97,7 +97,7 @@ Setup F<httpd.conf> (often just create a F</etc/apache2/conf.d/plp>) with:
     <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>
@@ -125,5 +125,5 @@ Mischa POSLAWSKY <perl@shiar.org>
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
-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>
 
 
similarity index 91%
rename from PLP/CGI.pm
rename to PLP/Backend/CGI.pm
index 698c34b1120d531e7dd1cbeb9e9c45e87a2f7933..3b4c4003f1e8a7cce2c5598e2a6740bd1b964872 100644 (file)
@@ -1,4 +1,4 @@
-package PLP::CGI;
+package PLP::Backend::CGI;
 
 use strict;
 
 
 use strict;
 
@@ -70,7 +70,7 @@ sub everything {
        $_[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();
 }
@@ -79,7 +79,7 @@ sub import {
 
 =head1 NAME
 
 
 =head1 NAME
 
-PLP::CGI - CGI interface for PLP
+PLP::Backend::CGI - CGI interface for PLP
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
@@ -87,7 +87,7 @@ For most servers you'll need a script executable.
 Example F</foo/bar/plp.cgi>:
 
     #!/usr/bin/perl
 Example F</foo/bar/plp.cgi>:
 
     #!/usr/bin/perl
-    use PLP::CGI;
+    use PLP::Backend::CGI;
 
 Or install the C<plp.cgi> included with PLP.
 
 
 Or install the C<plp.cgi> included with PLP.
 
@@ -122,5 +122,5 @@ Mischa POSLAWSKY <perl@shiar.org>
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
-L<PLP|PLP>, L<PLP::FastCGI|PLP::FastCGI>
+L<PLP|PLP>, L<PLP::Backend::FastCGI|PLP::Backend::FastCGI>
 
 
similarity index 79%
rename from PLP/FastCGI.pm
rename to PLP/Backend/FastCGI.pm
index 7db729697ad23c0c12de6acf5fb8864b21ddfc32..8ee326172d1fa8dcfb114ed9aab9f9befc26e29d 100644 (file)
@@ -1,10 +1,10 @@
-package PLP::FastCGI;
+package PLP::Backend::FastCGI;
 
 use strict;
 
 
 use strict;
 
-use PLP::CGI;
+use PLP::Backend::CGI;
 use FCGI;
 use FCGI;
-use base 'PLP::CGI';
+use base 'PLP::Backend::CGI';
 
 our $VERSION = '1.00';
 
 
 our $VERSION = '1.00';
 
@@ -22,7 +22,7 @@ sub import {
 
 =head1 NAME
 
 
 =head1 NAME
 
-PLP::FastCGI - FastCGI interface for PLP
+PLP::Backend::FastCGI - FastCGI interface for PLP
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
@@ -33,7 +33,7 @@ to enable I<mod_fastcgi> (add/outcomment in server.modules), and add:
 
     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",
         )),
     )
@@ -44,7 +44,7 @@ You'll need a dispatch script (F<plp.fcgi> is included with PLP).
 Example F</foo/bar/plp.fcgi>:
 
     #!/usr/bin/perl
 Example F</foo/bar/plp.fcgi>:
 
     #!/usr/bin/perl
-    use PLP::FastCGI;
+    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:
@@ -65,5 +65,5 @@ Mischa POSLAWSKY <perl@shiar.org>
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
-L<PLP|PLP>, L<PLP::CGI|PLP::CGI>, L<FCGI|FCGI>
+L<PLP|PLP>, L<PLP::Backend::CGI|PLP::Backend::CGI>, L<FCGI|FCGI>
 
 
diff --git a/plp.cgi b/plp.cgi
index c4094d73f140302d4a261751e64850b97030dfc3..58cb1d07fbe98dce22a9ce6b3dfecc96484df730 100755 (executable)
--- a/plp.cgi
+++ b/plp.cgi
@@ -3,5 +3,5 @@
 # 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.
 
-use PLP::CGI;
+use PLP::Backend::CGI;
 
 
index 372459ef56828bfc98cae85b35e793aec26bcba5..1eabbdb09cc5c146b42df4ae3aa57cb7961ad401 100755 (executable)
--- a/plp.fcgi
+++ b/plp.fcgi
@@ -3,5 +3,5 @@
 # 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::FastCGI;
+use PLP::Backend::FastCGI;