X-Git-Url: http://git.shiar.nl/perl/plp/.git/blobdiff_plain/6fc33d2b5bd84a3bfb1c8d393cf57e1081fcd623..52b63e9e0c0e3d3019a2751158f59cae036b6fe4:/PLP.pm diff --git a/PLP.pm b/PLP.pm index 2cb68ea..5899af3 100644 --- a/PLP.pm +++ b/PLP.pm @@ -44,7 +44,6 @@ sub clean { $PLP::sentheaders = 0; $PLP::DEBUG = 1; $PLP::print = ''; - $PLP::r = undef; delete @ENV{ grep /^PLP_/, keys %ENV }; } @@ -80,26 +79,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 +264,7 @@ PLP - Perl in HTML pages SetHandler perl-script - PerlHandler PLP + PerlHandler PLP::Apache PerlSendHeader On PerlSetVar PLPcache On @@ -293,8 +280,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)