# New Ticket Created by Jonathan Stowe # Please include the string: [perl #127901] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127901 >
If you try to provide the implementation of a multi method via a CALL-ME then invocation will give rise to "Cannot invoke object with invocation handler in this context". It is only necessary for the target method to be a multi not the CALL-ME. This appears to be related to https://rt.perl.org/Ticket/Display.html?id=122899 but I'm ticketing it separately as this is a more generalised case. This will also afflict multi native subs it seems. role Zub[::T] { proto method CALL-ME(|c) { * } multi method CALL-ME(Mu:D $self) { } multi method CALL-ME(Mu:D $self, T $i) { } } multi sub trait_mod:<is> (Method $m, :$foo!) is export { $m does Zub[Int]; } class Foo { proto method bar(|c) { * } multi method bar() is foo { } multi method bar(Int $o) is foo { } } Foo.new.bar(1);
