By the way: if you override an operator, you can still access the original one
using CORE::
sub infix:<+>($,$) { 42 }
say 200 + 300; # 42
say infix:<+>(200,300); # 42
say &CORE::infix:<+>(200,300); # 500
> On 26 Nov 2021, at 20:30, rir <[email protected]> wrote:
>
> Wow, that was a surprise. Thanks.
>
> But I was on this path:
>
> class Not-really-real {
> has Real $value handles &infix:<=>;
> }
>
> Rob
>
>
> On Fri, Nov 26, 2021 at 03:15:32PM +0100, Elizabeth Mattijsen wrote:
>> You mean like:
>>
>> say &infix:<+>(has 42,137); # 179
>> ?? If so, by referring to its full name :-)
>>
>>> On 26 Nov 2021, at 15:07, rir <[email protected]> wrote:
>>>
>>> Is it possible to to delegate plain or overridden operators? If so,
>>> what does the syntax look like?
>>>
>>> Rob
>>