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

Re: [perl #38809][PATCH] loss of stack elements with a do block insidea return

Thread Previous
From:
Vincent Pit
Date:
August 31, 2008 07:39
Subject:
Re: [perl #38809][PATCH] loss of stack elements with a do block insidea return
Message ID:
48BAAD24.3070001@profvince.com

> The patch attached is a way better solution compared to the previous one
> I sent some months ago. In ck_return, it looks at the kids and force
> list context on NULLs that have the OPf_SPECIAL flag set
Except that I realized that this solution would obviously not propagate
the caller's context to the block. The only way I found was then to add
an private flag for leave ops, turn it on in ck_return for those that
are kids of a return op, and in pp_leave use the caller's context
instead of the upper block one when the flag is set.

Corrected patch attached with more tests.

Thread Previous


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