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.
}
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 @_;
}