On Sat, 18 Jun 2005, Damian Conway wrote:
John Siracusa wrote:
(BTW, I'm not sure where those "./" thingies came from, but it's what
GMail
showed in your message. I'm assuming it should just be ".")
No. There's now also a unary ./ operator in Perl 6.
Unary . calls a specified method on the current topic.
Unary ./ calls a specified method on the current invocant.
The point being that methods no longer topicalize their invocant. So you need
to use ./ instead of . to call methods on an implicit invocant.
Er, is it true that methods don't topicalize the invocant nowadays? I had
thought that they do and one needs the ./ to still talk about the invocant
if some inner loop stole the $_, and until such stealing occurs .foo() and
./foo() are the same...
--abhijit
Damian
Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/