On Fri Jul 02 05:34:39 2010, jonat...@jnthn.net wrote: > Paweł Pabian (via RT) wrote: > > # New Ticket Created by Paweł Pabian > > # Please include the string: [perl #76330] > > # in the subject line of all future correspondence about this issue. > > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76330 > > > > > > > [19:53] <bbkr> rakudo: use MONKEY_TYPING; augment class Any { method > invoke > > {1} }; .() > > [19:53] <p6eval> rakudo 3d2cb8: OUTPUT«invoke() not implemented in > > class 'Any' in main program body at line 11:/tmp/e7TjCZoxtm» > > > > "augment class Any { ...}" part runs without error, but invoke > method is still > > missing in this class on ".()" call. > > > > > Mis-leading error but that's not going to work anyway. You need to > write at: > > method postcircumfix:<( )>($c) { 1 } > > /jnthn > >
And if you write it that way, it works: 10:36 < [Coke]> rakudo: use MONKEY_TYPING; augment class Any { method invoke {1} }; .() 10:36 <+p6eval> rakudo 38165a: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any' in <anon> at src/gen/Metamodel.pm:3368 in block <anon> at /tmp/lFGNk09Kyt:1 in <anon> at /tmp/lFGNk09Kyt:1» 10:37 < [Coke]> rakudo: use MONKEY_TYPING; augment class Any { method postcircumfix:<( )>($c) { 1 } }; .() 10:37 <+p6eval> rakudo 38165a: ( no output ) 10:37 < [Coke]> rakudo: use MONKEY_TYPING; augment class Any { method postcircumfix:<( )>($c) { 1 } }; .().say 10:37 <+p6eval> rakudo 38165a: OUTPUT«1» Closable with tests. -- Will "Coke" Coleda