On Wed, 28 Dec 2016 08:30:34 -0800, c...@zoffix.com wrote:
> $ ./perl6 -e $'class C { method foo { say 10 } }; foo C.new:\n'
> ===SORRY!=== Error while compiling -e
> Undeclared routine:
>     foo used at line 1
> 
> $ ./perl6 -v
> This is Rakudo version 2016.12-122-gd35efb6 built on MoarVM version
> 2016.12-23-g3c5253c
> implementing Perl 6.c.
> 
> 
> 
> This also appears to happen if written in a file or typed in the REPL

This is to spec, no?  Also, did it used to do something different without
the newline?  It seems to consistently look for sub foo even without it.

S12 says this:

In case of ambiguity between indirect object notation and dot form,
the nearest thing wins:

    dothis $obj.dothat: 1,2,3

means

    dothis ($obj.dothat(1,2,3))

and you must say

    dothis ($obj.dothat): 1,2,3

or

    $obj.dothat.dothis: 1,2,3

if you mean the other thing.

Reply via email to