P is for Practical | |
PerlMonks |
Re: Bug in eval in pre-5.14by Anonymous Monk |
on Jan 23, 2016 at 22:58 UTC ( [id://1153491]=note: print w/replies, xml ) | Need Help?? |
Just upgrading to a Perl >= 5.14 alone still does not mean $@ is always safe to use, see e.g. RT#123738 and RT#123773. So the only real solution is the eval { ...; 1 } or ... pattern, Try::Tiny, or similar. It's also a good habit to get into because it's backwards-compatible.
In Section
Meditations
|
|