summaryrefslogtreecommitdiff
path: root/lib/diagnostics.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diagnostics.pm')
-rwxr-xr-xlib/diagnostics.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm
index 031b08e156..c68fa3f79f 100755
--- a/lib/diagnostics.pm
+++ b/lib/diagnostics.pm
@@ -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 (@_) {