X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/e11a488e0909da46fd76f05a6aef47305055e43f..5a304009f58fdfc2158e2ebfc9dd0a7f610fabb1:/lib/PLP.pm diff --git a/lib/PLP.pm b/lib/PLP.pm index 2c6d714..7cb8d55 100644 --- a/lib/PLP.pm +++ b/lib/PLP.pm @@ -407,8 +407,9 @@ These are described in L. Not only syntax is important, you should also be aware of some other important features. Your script runs inside the package C and shouldn't leave it. This is because when your script ends, all global variables in the -C package are destroyed, which is very important if you run under -mod_perl (they would retain their values if they weren't explicitly destroyed). +C package are destroyed, which is very important if you run a +persistent backend (they would retain their values if they weren't explicitly +destroyed). Until your first output, you are printing to a tied filehandle C. On first output, headers are sent to the browser and C is selected for @@ -420,13 +421,13 @@ line your output started. An alternative way of setting headers is using Perl's BEGIN blocks. BEGIN blocks are executed as soon as possible, before anything else. -Because the interpreter that mod_perl uses never ends, C blocks won't -work properly. You should use C instead. Note that this is a not -a built-in construct, so it needs proper termination with a semi-colon (as do -C and C). +Unless you're running as CGI, the interpreter won't exit after processing a page, +so C blocks won't work properly. You should use C instead. +Note that this is a not a built-in construct, so it needs proper termination +with a semi-colon (as do C and C). -Under mod_perl, modules are loaded only once. A good modular design can improve -performance because of this, but you will have to B the modules +When run persistently, modules are loaded only once. A good modular design can +improve performance because of this, but you will have to B the modules yourself when there are newer versions. The special hashes are tied hashes and do not always behave the way you expect,