DouglasDD has asked for the wisdom of the Perl Monks concerning the following question:
eval { do_something_that_might_die(); 1; } or do { my $error = $@ || 'Zombie error'; deal_w($error) || die; }
Is that because $@ might contain something "false-y" (like 0, '0', "", undef)?
(If so, who cares? Why would I care if the "reason string" is false-y or not?)
Or is it a hold-over from bugs in ancient versions of perl?
If so, how old? if we already require versions greater than $v can we dispense with it?
((Sorry monks, I'm sure this has been asked before, but searches like "perl eval zombie error" and the like are mostly about zombie processes and code that already contains that boilerplate.))
Edit: I Forgot to mention that our local coding standards discourage Try::Tiny apparently because it's edge cases have been tripped over in the past.
|
|---|