On Mon, May 01, 2006 at 08:21:24PM +0300, Yuval Kogman wrote: > > bless currently just updates the pointed-top CV. > > Hence copy on right If bless just does a copy-on-write, then this breaks: $ perl588 -we '$a = sub {}; $b = $a; bless $a; print "not ok\n" if $a != $b' > This is what i propose: > > compiling of a sub will create a sub prototype, with no exposed > perl space value > > CVs become a small node, with typical SVish things, like a > blessed class, ref count, etc, and for closures they can also > refer to captured variables, I guess but that's roughly what a CV is anyway: it's an SV that contains pointers to an op tree and a scratchpad. -- You're only as old as you lookThread Previous | Thread Next