develooper Front page | perl.perl6.compiler | Postings from August 2005

Should this be valid in perl 6?

Thread Next
Yiyi Hu
August 16, 2005 09:27
Should this be valid in perl 6?
Message ID:
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:

    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;"


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About