Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter.pm blocks Signal handling #10254

Closed
p5pRT opened this issue Mar 24, 2010 · 5 comments
Closed

Exporter.pm blocks Signal handling #10254

p5pRT opened this issue Mar 24, 2010 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 24, 2010

Migrated from rt.perl.org#73794 (status was 'resolved')

Searchable as RT73794$

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2010

From @toddr

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.

Inline Patch
diff --git a/lib/Exporter.pm b/lib/Exporter.pm
index cd51828..60611ee 100644
--- a/lib/Exporter.pm
+++ b/lib/Exporter.pm
@@ -59,7 +59,7 @@ sub import {
   }
   return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
   local $SIG{__WARN__} = 
-       sub {require Carp; &Carp::carp};
+       sub {require Carp; &Carp::carp} if(!$SIG{__WARN__});
   # shortcut for the common case of no type character
   *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
 }

@p5pRT
Copy link
Author

p5pRT commented Sep 28, 2010

From @toddr

This change was committed to blead​: 9b86bb5
A version bump also happened on the module.

This ticket is ready to be closed.

@p5pRT
Copy link
Author

p5pRT commented Sep 28, 2010

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2011

From @toddr

On Tue Sep 28 16​:24​:59 2010, TODDR wrote​:

This change was committed to blead​: 9b86bb5
A version bump also happened on the module.

This ticket is ready to be closed.

Could someone please close this ticket? Thanks.

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2011

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Jul 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant