* die, warn, and $@ have been greatly simplified to eliminate long-standing edge cases and action at a distance
Now that's a change I really like, and look forward to rely on it.
From perl5131delta:
Several changes have been made to the way die, warn, and $@ behave, in order to make them more reliable and consistent.
When an exception is thrown inside an eval, the exception is no longer at risk of being clobbered by code running during unwinding (e.g., destructors). Previously, the exception was written into $@ early in the throwing process, and would be overwritten if eval was used internally in the destructor for an object that had to be freed while exiting from the outer eval. Now the exception is written into $@ last thing before exiting the outer eval, so the code running immediately thereafter can rely on the value in $@ correctly corresponding to that eval.
Likewise, a local $@ inside an eval will no longer clobber any exception thrown in its scope. Previously, the restoration of $@ upon unwinding would overwrite any exception being thrown. Now the exception gets to the eval anyway. So local $@ is safe inside an eval, albeit of rather limited use.
It's one of those weaknesses I (and others) have been whining about for years, so I'm glad to see it's gone.
A big "thank you" goes to p5p and everybody who has contributed to it.
P.S. the perldelta link is broken until perldoc.perl.org is updated, you can read it on github in the mean time.
In reply to Re: Perl 5.13.1 is available
by moritz
in thread Perl 5.13.1 is available
by JavaFan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |