develooper Front page | perl.perl5.porters | Postings from October 2011

Re: Are exceptions "still broken" in core Perl?

Thread Previous | Thread Next
From:
Jesse Luehrs
Date:
October 25, 2011 07:28
Subject:
Re: Are exceptions "still broken" in core Perl?
Message ID:
20111025142756.GV14233@tozt.net
On Tue, Oct 25, 2011 at 03:10:52PM +0100, Zefram wrote:
> Tom Christiansen wrote:
> >      * $@ might not be a true value
> 
> That still exists.

Can it? I tried getting this to happen in 5.14, and couldn't - the only
way I knew how was to have a destructor that called eval get called as
the enclosing eval finished, and that doesn't happen anymore in 5.14,
since destructors localize @$.

Well, i suppose it can obviously happen if you do anything at all
between the eval and checking $@, and that's a reasonable reason to want
something like Try::Tiny (so that those two operations can't be
separated). Try::Tiny is also still important because I don't think very
many people are writing code for only 5.14 yet.

-doy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About