Created
October 27, 2010 02:39
-
-
Save skreuzer/648313 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use lib 'lib'; | |
use SourceCarp fatal => 1, warnings => 1; | |
# throw warning | |
open my $fh, '<', '/no/file'; | |
print {$fh} | |
# report from subroutine | |
report_with_level( ); | |
sub report_with_level | |
{ | |
SourceCarp::report( "report caller, not self\\n", 2 ); | |
} | |
# throw error | |
die "Oops!"; | |
print "hello world\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment