X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdiagnostics.pm;h=c68fa3f79f8e9d361942686e6014d1d7622d520c;hb=f6d6199cd6711f5e8a8e6c1a57445fa6f848c822;hp=5d8f4e7c8f6cf4506dfda45b19b63ea7ee15bb64;hpb=88d01e8dd0be693cf54a3bafc9974fa70eda2ddd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index 5d8f4e7..c68fa3f 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -168,7 +168,7 @@ Tom Christiansen >, 25 June 1995. =cut use strict; -use 5.6.0; +use 5.006; use Carp; our $VERSION = 1.1; @@ -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 (@_) {