On 5/17/05, Aaron Sherman <[EMAIL PROTECTED]> wrote:
> Let's say that that's true. You can certainly still end up in conflict:
> 
>         class A {...}
>         my A $a = A.new() but role { method x() {...} }
>         eval 'multi sub x(A $i:) {...}';
> 
> Now, the eval should work because A has no x method, but you do now have
> a $a which will conflict on $a.x

Well, the way I see it is like so:

    class A {...}
    class A_anonymous_role is A { method x() {...} }
    my A $a = A_anonymous_role.new;
    eval 'multi sub x(A $i:)';

And that the method gets called because it's more specific than the
multi.  But that's assuming the transformation:

    class A { method x() {...} }

To:

    multi sub x(A $self:) {...}

Which could be wrong.  I think I have pretty good cause to infer that, though.

Luke

Reply via email to