Guest User

Untitled

a guest
Jun 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. use lib 'lib';
  7. use SourceCarp fatal => 1, warnings => 1;
  8.  
  9. # throw warning
  10. open my $fh, '<', '/no/file';
  11. print {$fh}
  12.  
  13. # report from subroutine
  14. report_with_level( );
  15.  
  16. sub report_with_level
  17. {
  18. SourceCarp::report( "report caller, not self\\n", 2 );
  19. }
  20.  
  21. # throw error
  22. die "Oops!";
  23.  
  24. print "hello world\n";
Add Comment
Please, Sign In to add comment