X-Git-Url: http://git.shiar.net/gitweb.cgi/perl/plp/.git/blobdiff_plain/3565beca174066a12d2d952d4b24d79a0ca55412..756d5de12d15296e7689a7c5c7b5e35bd0bccb0e:/PLP.pm diff --git a/PLP.pm b/PLP.pm index ad4a227..52fba51 100644 --- a/PLP.pm +++ b/PLP.pm @@ -2,7 +2,7 @@ package PLP; # Not to be used without the CGI script; -our $VERSION = '3.03'; +our $VERSION = '3.04'; use PLP::Functions (); use PLP::Fields; @@ -101,10 +101,11 @@ sub source { sub error { my ($error, $type) = @_; if (not defined $type or $type < 100) { + return undef unless $PLP::DEBUG & 1; + my $plain = $error; + (my $html = $plain) =~ s/([<&>])/'' . ord($1) . ';'/ge; PLP::sendheaders unless $PLP::sentheaders; - $error =~ s/([<&>])/'' . ord($1) . ';'/ge; - print qq{
},
- qq{Debug information: $error |
},
+ qq{Debug information: $html |