Hi, my $x = new Proxy: FETCH => { foo() }, STORE => { bar($^new) }; $x ~~ Proxy; # true $x = 42; # neither foo nor bar called $x ~~ Num; # true
my $y := new Proxy: FETCH => { foo() }, STORE => { bar($^new) }; $y ~~ Proxy; # false (unless foo returns a Proxy object) $y = 42; # bar(42) called $y ~~ Proxy; # still false (unless foo returns a Proxy object) say $y; # foo() called Correct? BTW, is it possible to implement the Proxy class in pure Perl? (I don't think so.) --Ingo -- Linux, the choice of a GNU | Row, row, row your bits, gently down the generation on a dual AMD | stream... Athlon! |