# Pastebin VJioCxoP  perl6 -e ' class A { has $.xx is rw = 0; has &.method-cb is rw = { "default method-cb".say; .xx = 3; }; method do-test () { "calling method-cb".say; self.&!method-cb(); $!xx.perl.say; } } my $a = A.new; $a.method-cb = { .xx = 5; }; $a.do-test; ' calling method-cb 5