From 7f913ac37060cadb76782acdc0a2df30484c40c2 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 15 Mar 2008 01:52:51 +0100 Subject: [PATCH] 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). --- PLP/CGI.pm | 6 +++++- plp.cgi | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) 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; -- 2.30.0