Last active
August 29, 2015 14:17
-
-
Save dagolden/84b33f438c639d93158b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### Bar.pm ################ | |
use 5.008001; | |
use strict; | |
use warnings; | |
package Bar; | |
use warnings::register; | |
sub hello { | |
warnings::warnif( "problem" ); | |
print "Hello\n"; # XXX NEVER RUNS | |
} | |
1; | |
########### Foo.pm ################ | |
use 5.008001; | |
use strict; | |
use warnings; | |
package Foo; | |
use warnings FATAL => 'all'; | |
use Bar; | |
sub hi { Bar::hello() } | |
1; | |
########### Bar.pm ################ | |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Foo; | |
Foo::hi(); | |
########### output ################ | |
$ perl foo.pl | |
problem at Foo.pm line 11. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment