X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdiagnostics.pm;h=1ba70c5b6c4502011209f01bcf40bb11ae2d3f79;hb=4d94824190f1d3f4307c94794486b277afd6e971;hp=b2249430b2c21b36d755c1e493766d235c15421c;hpb=d23f020529b1cb2636f0fbed24f1fc13fd63eac2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index b224943..1ba70c5 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -4,7 +4,7 @@ package diagnostics; diagnostics - Perl compiler pragma to force verbose warning diagnostics -splain - standalone program to do the same thing +splain - filter to produce verbose descriptions of perl warning diagnostics =head1 SYNOPSIS @@ -16,7 +16,7 @@ As a pragma: enable diagnostics; disable diagnostics; -Aa a program: +As a program: perl program 2>diag.out splain [-v] [-p] diag.out @@ -168,10 +168,10 @@ Tom Christiansen >, 25 June 1995. =cut use strict; -use 5.6.0; +use 5.006; use Carp; -our $VERSION = 1.0; +our $VERSION = 1.1; our $DEBUG; our $VERBOSE; our $PRETTY; @@ -411,7 +411,7 @@ sub import { shift; $^W = 1; # yup, clobbered the global variable; # tough, if you want diags, you want diags. - return if $SIG{__WARN__} eq \&warn_trap; + return if defined $SIG{__WARN__} && ($SIG{__WARN__} eq \&warn_trap); for (@_) {