Re: Diffrence between is and does in scope of overriding multi methods

2014-06-27 Thread Kamil Kułaga
Hi Timo, After I read your explanation and now it is even logical to use role punning in my app. In most cases I don't want to override this default behavior of method xyz but I would like to add new specific one. Only one class does opposite so it should be subclass of a role. On Fri, Jun 27, 20

Re: Diffrence between is and does in scope of overriding multi methods

2014-06-27 Thread Elizabeth Mattijsen
On 27 Jun 2014, at 09:25, Timo Paulssen wrote: > On 27/06/14 10:07, Kamil Kułaga wrote: >> Hi, >> >> I would like to ask for help in understanding difference between this code: >> >>use v6; >> >>role X { >>multi method xyz(Any $a) {say "Class X"} >> } >> >> class Y does

Re: Diffrence between is and does in scope of overriding multi methods

2014-06-27 Thread Timo Paulssen
On 27/06/14 10:07, Kamil Kułaga wrote: Hi, I would like to ask for help in understanding difference between this code: use v6; role X { multi method xyz(Any $a) {say "Class X"} } class Y does X { multi method xyz(Any $a) {say "Class Y"} } say Y.ne

Diffrence between is and does in scope of overriding multi methods

2014-06-27 Thread Kamil Kułaga
Hi, I would like to ask for help in understanding difference between this code: use v6; role X { multi method xyz(Any $a) {say "Class X"} } class Y does X { multi method xyz(Any $a) {say "Class Y"} } say Y.new.xyz(1); $ perl6 tst.pl Ambiguous call