in reply to Re^2: eval: Why use the 'Zombie error' idiom?
in thread eval: Why use the 'Zombie error' idiom?
The docs for eval suggest this idiom:
# alter $@ on nefarious repugnancy only { my $e; { local $@; # protect existing $@ eval { test_repugnancy() }; # $@ =~ /nefarious/ and die $@; # Perl 5.14 and higher only $@ =~ /nefarious/ and $e = $@; } die $e if defined $e }
|
|---|