On Fri, Jul 09, 2004 at 05:02:48PM +0100, Jonathan Worthington wrote:
: Would that not be:-
: 
:     say "Basename is $(str.subst(rx|.*/|, ''))"
: 
: I thought when you were interpolating method calls you had to put brackets
: $(object.meth), so that you could still write things like:-
: 
: $fh = open "$id.txt";  # OK, maybe my open syntax isn't right
: 
: Or is it that you can do:-
: 
: say "$object.meth()";
: 
: But not:-
: 
: say "$object.meth";
: 
: And the later (...) distinguish that we are doing a method call?
: 
: Or am I completely wrong?  :-)

No, just currently wrong. :-)  I changed my mind about it in A12,
partly on the assumption that $object.attr would actually be more
common than $file.ext, but also because a bogus method call is likely
to be noticed sooner than bad output data, and because noticing
goofs sooner rather than later is often construed to be a good thing.
(Though this attitude can be taken to extremes--see static typing.)

Larry

Reply via email to