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

Re: local $@ has an unwanted side effect

Thread Previous | Thread Next
March 21, 2008 10:58
Re: local $@ has an unwanted side effect
Message ID:
On Fri, Mar 21, 2008 at 10:49:28AM -0700, Jan Dubois wrote:
> PS: This is another can of worms, but I would even argue that any
> exception thrown that would unwind outside the DESTROY call frame
> while we are already unwinding the stack for an earlier exception
> should be a fatal error.  This would essentially mean that DESTROY
> should not throw exceptions at all (unless we make the fact that
> we are unwinding the stack already available in something like $^S).

But DESTROY is also the place to shutdown resources. And

    close $handle or die "...";

is very common idiom.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About