$@ 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.)
$@ 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.)