From: Jens Berthold Date: Fri, 14 Jul 2017 11:13:06 +0000 (+0200) Subject: document Perl 5.14.0 fixed $@ clobbering in DESTROY X-Git-Tag: v0.29~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1ab4ef09b6eef778693ceac185ad4d10a595542;p=p5sagit%2FTry-Tiny.git document Perl 5.14.0 fixed $@ clobbering in DESTROY This is from PR#8: - rebased to master - commits squashed - links fixed as per Aristotle's comment - wordwrapped --- diff --git a/lib/Try/Tiny.pm b/lib/Try/Tiny.pm index 7d7a9cd..501b006 100644 --- a/lib/Try/Tiny.pm +++ b/lib/Try/Tiny.pm @@ -386,8 +386,10 @@ not yet handled. C<$@> must be properly localized before invoking C in order to avoid this issue. -More specifically, C<$@> is clobbered at the beginning of the C, which -also makes it impossible to capture the previous error before you die (for +More specifically, +L +C<$@> was clobbered at the beginning of the C, which +also made it impossible to capture the previous error before you die (for instance when making exception objects with error stacks). For this reason C will actually set C<$@> to its previous value (the one @@ -430,7 +432,7 @@ because due to the previous caveats it may have been unset. C<$@> could also be an overloaded error object that evaluates to false, but that's asking for trouble anyway. -The classic failure mode is: +The classic failure mode (fixed in L) is: sub Object::DESTROY { eval { ... }