为什么Perl 6 REPL中没有新的运算符定义?

Dan*_*ita 13 operators user-defined-functions perl6 read-eval-print-loop raku

我在试验在Perl 6 REPL上定义运算符时遇到了问题,并注意到它们确实有效,但只有在它们被定义的同一行上使用时才会有效.为什么会这样?

> sub postfix:<!>(Int $x where { $x >= 0 }) { [*] 1..$x }; 6!;
720
> 6!;
===SORRY!=== Error while compiling:
Negation metaoperator not followed by valid infix
------> 6!?;
    expecting any of:
        infix
        infix stopper
Run Code Online (Sandbox Code Playgroud)

rai*_*iph 9

这是一个错误.

请参阅错误报告Perl6 REPL忘记定义...REPL问题定义新运算符...以获取更多详细信息.