On Tue Jul 30 17:43:09 2013, demerphq wrote: > On 31 July 2013 01:05, Father Chrysostomos via RT > > In short: closures close over variables, not lexical scopes, unless > > string eval is involved. (So one can work around this by including eval > > "" in the sub.) > > > > I don’t think anything needs fixing here, so I am rejecting the ticket. > > > > IMO if you have to include eval "" in your sub then there is something > else wrong too. How so? PadWalker is peeking at perl internals and can see implementation details. In the presence of eval, perl cannot know which variables the sub is going to close over, so it closes over all of them. In its absence it closes over only those it has to. What I am saying is that PadWalker is a bit like B: If the internals change, then what you see through that interface changes, because there is no abstraction. We shouldn’t have to maintain that type of compatibility. > > I'm not saying this argues against closing the ticket, but right now > it is not clear to me that it should be. -- Father Chrysostomos --- via perlbug: queue: perl5 status: rejected https://rt.perl.org:443/rt3/Ticket/Display.html?id=119049Thread Previous | Thread Next