git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v3.06 release
[perl/plp/.git]
/
plp.cgi
diff --git
a/plp.cgi
b/plp.cgi
index e9961f6511ef4d7669b3abce5b77a3967ce048c4..a16835c06015ca38d38d48d21c2721b851495d26 100755
(executable)
--- a/
plp.cgi
+++ b/
plp.cgi
@@
-3,9
+3,10
@@
use v5.6.0;
use PLP;
use strict;
use PLP;
use strict;
-die 'Wrong module version' if $PLP::VERSION ne '3.0
4
';
+die 'Wrong module version' if $PLP::VERSION ne '3.0
6
';
{
{
+ @PLP::END = ();
$PLP::code = '';
$PLP::sentheaders = 0;
$PLP::inA = 0;
$PLP::code = '';
$PLP::sentheaders = 0;
$PLP::inA = 0;
@@
-25,11
+26,13
@@
PLP::start();
*cookies = \%cookie;
PLP::Functions->import();
# No lexicals may exist at this point.
*cookies = \%cookie;
PLP::Functions->import();
# No lexicals may exist at this point.
- eval qq{package PLP::Script; $PLP::code};
+ eval qq{ package PLP::Script; $PLP::code; };
+ PLP::error($@, 1) if $@ and $@ !~ /\cS\cT\cO\cP/;
+ eval { package PLP::Script; $_->() for reverse @PLP::END };
+ PLP::error($@, 1) if $@ and $@ !~ /\cS\cT\cO\cP/;
}
}
- PLP::
error($@, 1) if $@
;
+ PLP::
sendheaders() unless $PLP::sentheaders
;
select STDOUT;
undef *{"PLP::Script::$_"} for keys %PLP::Script::;
select STDOUT;
undef *{"PLP::Script::$_"} for keys %PLP::Script::;
- PLP::sendheaders() unless $PLP::sentheaders;
}
}