On Thu Jun 18 04:24:13 2009, masak wrote: > <masak> rakudo: class Failure is also { method foo {say "OH HAI"} }; > .foo > <p6eval> rakudo 9dc941: OUTPUT«OH HAI» > <moritz_> new in Perl 6: extensinble undef! > <masak> rakudo: class Failure is also { method defined { True } }; say > .defined > <p6eval> rakudo 9dc941: ( no output ) > * masak snickers > <masak> that one gives a bus error on my box. > <moritz_> it's what happens when a program tries to use memory outside > of its address range > <masak> rakudo: class Failure is also { method perl { "HOLA!" } }; say > .perl > <p6eval> rakudo 9dc941: ( no output ) > <masak> seems the problem is in overriding methods that were defined > already. > <moritz_> "no output" is wrong though > <masak> moritz_: yes. that's what I mean. > <moritz_> ah yes, it's a segfault > <moritz_> which, for whatever reasons, is printed to the console, not > to IRC > <masak> "no output" here means that a bus error occurred. > <masak> rakudo: class A { method foo { 1 } }; class A is also { method > foo { 2 } }; A.new.foo > <p6eval> rakudo 9dc941: ( no output ) > <masak> ah. > <masak> and it's not just PIR methods. > * masak submits rakudobug
< [Coke]> rakudo: use MONKEY_TYPING; augment class Failure { method defined { True } }; say .defined <+p6eval> rakudo c1e19a: OUTPUT«===SORRY!===A method named 'defined' already exists in class 'Failure'. It may have been supplied by a role.» < [Coke]> rakudo: use MONKEY_TYPING; class A { method foo { 1 } }; augment class A { method foo { 2 } }; A.new.foo <+p6eval> rakudo c1e19a: OUTPUT«===SORRY!===A method named 'foo' already exists in class 'A'. It may have been supplied by a role.» This looks much saner. Assigning to moritz++ for testing. -- Will "Coke" Coleda