marcbradshaw / mail-dkim

Mail::DKIM Perl module, forked from svn://svn.code.sf.net/p/dkimproxy/code/Mail-DKIM/trunk
0 stars 13 forks source link

Use eval { } safely #8

Closed pflanze closed 4 years ago

pflanze commented 4 years ago

$@ can be clobbered in destructors not using "local" to protect $@, which is why checking for exceptions via $@ is unsafe. This is something recognized in the Perl community and something that the author of this patch has been bitten by in other projects.

(I noticed that some cases of eval were already rewritten that way in commit 6d397bb1fe3716a1d2b080063a4282d755ad6fc1.)