From: Mischa POSLAWSKY Date: Sat, 15 Mar 2008 00:52:51 +0000 (+0100) Subject: handle request automatically on PLP::CGI import X-Git-Tag: 3.20~22 X-Git-Url: http://git.shiar.net/perl/plp/.git/commitdiff_plain/7f913ac37060cadb76782acdc0a2df30484c40c2 handle request automatically on PLP::CGI import As it's not used for much else, PLP::CGI can simply start running on import. So like PLP::FastCGI, the executable only needs to C (and C for advanced usage). No backwards compatibility issues, as the last release didn't have this modularized (PLP wrapper works the same as before). --- diff --git a/PLP/CGI.pm b/PLP/CGI.pm index 817a552..1f46a3c 100644 --- a/PLP/CGI.pm +++ b/PLP/CGI.pm @@ -65,11 +65,15 @@ sub read ($) { return $data; } -# This is run by the CGI script. (#!perl \n use PLP::CGI; PLP::CGI::everything;) sub everything { PLP::clean(); $_[0]->init() and PLP::start(); } +# This is run by the CGI script. (#!perl \n use PLP::CGI;) +sub import { + $_[0]->everything(); +} + 1; diff --git a/plp.cgi b/plp.cgi index aa3b32f..0b64457 100644 --- a/plp.cgi +++ b/plp.cgi @@ -3,7 +3,5 @@ # This script is not installed automatically, and is not needed for mod_perl # installations. -use PLP; -PLP::everything(); - +use PLP::CGI;