Re: RFC 174 (v1) Parse C<func($obj, @args)> as C<func $obj (@args)>
[email protected] (Tom Christiansen) Wed, 30 Aug 2000 18:14:08 -0600
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <32650.967680848@chthon> |
> package main;
> sub somefunc { ... }
> use MyPackage;
> my $mypkg = new MyPackage;
> func($mypkg, @args); # $mypkg->func(@args)
>So, the first one will always be MyPackage::func, and the last one will
>always be $object->func, because there is no main::func.
But when would you know that? You have to look inside at run-time.
This precludes precomputing where *func lives, as current occurs.
--tom