Autodie

autodie(3p) Perl Programmers Reference Guide autodie(3p)

Autodie

autodie(3p) Perl Programmers Reference Guide autodie(3p) # autodie(3p) Perl Programmers Reference Guide autodie(3p) NNAAMMEE # autodie - Replace functions with ones that succeed or die with lexical scope SSYYNNOOPPSSIISS # use autodie; # Recommended: implies 'use autodie qw(:default)' use autodie qw(:all); # Recommended more: defaults and system/exec. use autodie qw(open close); # open/close succeed or die open(my $fh, "<", $filename); # No need to check! { no autodie qw(open); # open failures won't die open(my $fh, "<", $filename); # Could fail silently! ...