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

Re: [perl #119049] referencing some variables hides others fromPadWalker starting 5.17.2

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 2, 2013 03:12
Subject:
Re: [perl #119049] referencing some variables hides others fromPadWalker starting 5.17.2
Message ID:
20130802031242.GB8986@cancer.codesimply.com
* Father Chrysostomos via RT <perlbug-followup@perl.org> [2013-07-31T21:15:33]
> Now one thing we could do is leave the closure with its CvOUTSIDE
> pointer but make it a weak pointer.  That would involve backreferences
> to make sure it gets cleared if the outer sub is freed.

This occurred to me last night after a while, as well, and...

> I didn’t think it was worth the complexity involved.  How strongly do
> you feel about having this work?

...I suppose I agree, too.  I think that whilst I would like the facility to
work the way I find most unsurprising, the lengths to which one must go to find
out whether or not it's surprising are already pretty long...

...and anyway, we'd not be able to backport to 5.18, leaving a big year-long
window in which it doesn't work, and...

...well, I think we'll do just fine.  I will emit a whistful sigh once a year,
and no one else will be too bothered.  I am now deleting this thread from my
MUA.

> BTW, PadWalker does give surprising results even before a0d2bbd5c47 if
> it accesses a variable implicitly closed over that comes from an outer
> scope that is not a closure, and that outer scope has already exited.

Nice. :)

-- 
rjbs

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