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

Re: [perl #20823] BEGIN { local $@; die 'foo' } doesn't die

Thread Previous | Thread Next
From:
Enache Adrian
Date:
March 5, 2003 21:31
Subject:
Re: [perl #20823] BEGIN { local $@; die 'foo' } doesn't die
Message ID:
20030306053337.GA906@ratsnest.hole
On Wed, Mar 05, 2003 at 02:31:29PM -0800, Yitzchak Scott-Thoennes wrote:
> On 5 Mar 2003 06:02:33 -0000, perlbug-followup@perl.org wrote:
> >On Mon, Feb 10, 2003 at 08:44:08PM -0000, Yitzchak Scott-Thoennes wrote:
> >> BEGIN { local $@; die 'foo' } seems to bail out of the BEGIN, but doesn't
> >> actually die, as if the BEGIN was an eval.
> >
> >The code in Perl_call_list checks for the length of ERRGV ( aka $@ ),
s/ERRGV/ERRSV/

> Not sure what you mean by catch/un-catchable here.  Maybe it will be
> clear when I look at the code.

Perl_call_list calls itself, by means of S_v?call_list_body
	call_sv((SV*)cv, G_EVAL|G_DISCARD);

and it seems to be no other way to know if that completed correctly
( or called die ) that to check if $@/PL_errgv is clear.

Regards

Adi

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