On Mon, May 01, 2006 at 06:49:41PM +0100, Dave Mitchell wrote: > 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' So the problem is that there are two pairs of two in: $ perl -lwe 'sub foo { my $q = sub {}; ($q, $q) } my @a = foo(); my @b = foo; print "@a / @b"' CODE(0xfdd84) CODE(0xfdd84) / CODE(0xfdd84) CODE(0xfdd84) but currently it's not clear which they are :-) I like the idea of the real copies but shared scratchpads. I hope it's viable. Nicholas ClarkThread Previous | Thread Next