X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/d7fd5b9d9c2a137d73f2c42751011503ec96dd37..5d1c2193a6c3c98cf426e03eb783eace183e5a0c:/PLP.pm diff --git a/PLP.pm b/PLP.pm index 2cb68ea..a919cb7 100644 --- a/PLP.pm +++ b/PLP.pm @@ -80,26 +80,14 @@ sub error { } } -# This is run by the CGI script. (#!perl \n use PLP; PLP::everything;) +# Wrap old request handlers. sub everything { require PLP::CGI; - clean(); - PLP::CGI::init(); - start(); + PLP::CGI::everything(); } - -# This is the mod_perl handler. sub handler { require PLP::Apache; - require Apache::Constants; - clean(); - if (my $ret = PLP::Apache::init($_[0])) { - return $ret; - } - #S start($_[0]); - start(); - no strict 'subs'; - return Apache::Constants::OK(); + PLP::Apache::handler(@_); } # Sends the headers waiting in %PLP::Script::header @@ -277,7 +265,7 @@ PLP - Perl in HTML pages SetHandler perl-script - PerlHandler PLP + PerlHandler PLP::Apache PerlSendHeader On PerlSetVar PLPcache On @@ -293,8 +281,8 @@ PLP - Perl in HTML pages =item * /foo/bar/plp.cgi (local filesystem address) #!/usr/bin/perl - use PLP; - PLP::everything(); + use PLP::CGI; + PLP::CGI::everything(); =item * httpd.conf (for CGI setup)