Indirect object notation now requires a colon after the invocant if
there are any arguments. If there are no arguments and you omit the
colon, the notation is parsed either as a named unary operator or a
list operator with one argument. In any case, all of these come out to
the same thing:

    $handle.close
    close($handle)
    close $handle:
    close $handle

>From Synoposis, It's said that the last example( close $handle )
should be valid.
But in pugs, It isn't.

class TMP { method tmp { "Hello".say}; }; my TMP $t .= new;
tmp $t;

So, I wonder, If perl 6 will allow "tmp $t;"

Thanks,
Xinming

Reply via email to