develooper Front page | perl.perl5.porters | Postings from March 2008

Re: local $@ has an unwanted side effect

Thread Previous | Thread Next
From:
Abigail
Date:
March 21, 2008 09:52
Subject:
Re: local $@ has an unwanted side effect
Message ID:
20080321165211.GB7226@abigail.be
On Fri, Mar 21, 2008 at 11:41:41AM -0500, David Nicol wrote:
> So should we introduce an automatic localization of $@ before destruction?


Well, it might have been a good idea to do this when DESTROY was first
introduced.

I know that I've written code in the past which would die() in a DESTROY,
which was triggered from an eval, and I'd expect $@ afterwards.

Such code would fail if we'd introduce automatic localization of $@.

Is that worth it?


Abigail

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