Re: Assigning Proxy objects

2005-06-14 Thread Larry Wall
On Tue, Jun 14, 2005 at 12:33:34PM +, Ingo Blechschmidt wrote: : Hi, : : sub proxy () is rw { : return new Proxy: : FETCH => { 42 }, : STORE => -> $new { 23 }; : } : : say proxy();# 42 : say proxy() = 40; # 40, 23, or 42? : : Currently I think the

Assigning Proxy objects

2005-06-14 Thread Ingo Blechschmidt
Hi, sub proxy () is rw { return new Proxy: FETCH => { 42 }, STORE => -> $new { 23 }; } say proxy();# 42 say proxy() = 40; # 40, 23, or 42? Currently I think the last line should output 40, consider: sub innocent_sub ($var is copy) { my $foo