diff options
author | Todd Rinaldo <toddr@cpanel.net> | 2010-07-03 15:32:08 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2010-07-03 15:32:08 +0200 |
commit | 9b86bb5cacfb65a283299b005919058f8a61701a (patch) | |
tree | 9e54b0239c98cb455075ee4eb62e2e30203a8163 /lib/Exporter.pm | |
parent | cae9400fee55b7e628d974f47e5bbebb4180a9c2 (diff) | |
download | perl-9b86bb5cacfb65a283299b005919058f8a61701a.tar.gz |
Fix RT #74472 Exporter.pm blocks Signal handling
Exporter.pm overrides SIG{__WARN__}. This means It's not possible to
write a test to trap warning events for this error. Since all the line
seems to do is make the warning more verbose, I suggest it not be done
if someone has defined a custom signal. At the moment Test::NoWarnings
cannot trap these warnings because of this.
Diffstat (limited to 'lib/Exporter.pm')
-rw-r--r-- | lib/Exporter.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm index c37f39ca3f..5fcc9932f0 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -62,7 +62,7 @@ sub import { } return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; local $SIG{__WARN__} = - sub {require Carp; &Carp::carp}; + sub {require Carp; &Carp::carp} if not $SIG{__WARN__}; # shortcut for the common case of no type character *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_; } |