On Tue, Apr 01, 2003 at 09:25:39AM +1000, Damian Conway wrote:
&baz does refer to the Code object itself, as you say.

However, the &bar(...) syntax *will* DWYM too. That's because:

&baz(@args);

is just a shorthand for:

&baz.(@args);

That's not what page 5 of Apoc 6 says:


<quote>
Note that when following a name like "&factorial", parentheses do not automatically mean to make a call to the subroutine. (This Apocalypse contradicts earlier Apocalypses. Guess which one is right...)


   $val = &factorial($x);      # illegal, must use either
   $val = factorial($x);       #   this or
   $val = &factorial.($x);     #   maybe this.

In general, don't use the & form when you really want to call something.
</quote>

--
Matthijs van Duin  --  May the Forth be with you!

Reply via email to