develooper Front page | perl.perl5.porters | Postings from June 2012

[perl #89544] closure keeps containing scope alive

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
June 18, 2012 12:45
Subject:
[perl #89544] closure keeps containing scope alive
Message ID:
rt-3.6.HEAD-5009-1340048704-476.89544-15-0@perl.org
On Mon Jun 18 09:59:19 2012, davem wrote:
> On Mon, Jun 18, 2012 at 09:40:55AM -0700, Father Chrysostomos via RT
wrote:
> > I have just been bitten by the same thing.  So I wrote a patch.  It is
> > only eight lines (excluding tests).  Ignoring the new flag I added to
> > cv.h, it is only three lines of changes.
> > 
> > Can Dave Mitchell please comment?
> > 
> > As far as I can tell, CvOUTSIDE is only used during compilation when
> > looking up variables.  So at run time we only need it if there is a
> > string eval.
> 
> Yes, it looks plausible. Is CvOUTSIDE already set to NULL in the non-eval
> branch of cv_clone?

Yes.  sv_upgrade (called from newSV_type) zeroes SvANY.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=89544

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