in reply to eval: Why use the 'Zombie error' idiom?
In the few cases i am forced to use eval, i usually do something like this:
my $ok = 0; eval { do_something_that_might_die(); $ok = 1; }; if(!$ok) { shout_at_user(); }
This way, i don't have to deal with the error message. And in my personal opinion, it's much more readable. The downside, of course, is that Perl::Critic shouts at you - a lot.
|
|---|