X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/5a304009f58fdfc2158e2ebfc9dd0a7f610fabb1..3dd60490b2f12aeabc457292b87fe43772ce0304:/lib/PLP.pm diff --git a/lib/PLP.pm b/lib/PLP.pm index 7cb8d55..680dba8 100644 --- a/lib/PLP.pm +++ b/lib/PLP.pm @@ -14,7 +14,7 @@ use File::Spec; use strict; use warnings; -our $VERSION = '3.21'; +our $VERSION = '3.22_01'; # Subs in this package: # _default_error($plain, $html) Default error handler @@ -76,7 +76,9 @@ sub error { print "Status: $type\nContent-Type: text/html\n\n", qq{\n}, "\n$type $short\n\n

$short", - "

\n$long

\n


\n$ENV{SERVER_SIGNATURE}"; + "\n$long

\n


\n"; + print $ENV{SERVER_SIGNATURE} if $ENV{SERVER_SIGNATURE}; + print ""; } } @@ -92,6 +94,7 @@ sub handler { # Sends the headers waiting in %PLP::Script::header sub sendheaders () { + local $\; # reset print behaviour if triggered by say() $PLP::sentheaders ||= [ caller 1 ? (caller 1)[1, 2] : (caller)[1, 2] ]; print STDOUT "Content-Type: text/plain\n\n" if $PLP::DEBUG & 2; while (my ($header, $values) = each %PLP::Script::header) {