On Wed, Mar 19, 2003 at 01:07:32PM +1100, Damian Conway wrote:
: Larry wrote:
: > A file-scoped $_ could be considered a sort of a half-way house to full
: > signatured $_ semantics.  You couldn't clobber some other module's $_,
: > but you still get a dynamically scoped $_ where naive users expect it.
: >
: > It's not a beautiful solution, but it might make the migration a lot
: > smoother.  Something to be said for that...
: 
: Isn't that still going to break most translations? I mean, if a Perl 5
: method (that's being translated to Perl 6) refers to $_, it surely means 
: $CALLER::_, not $OUTER::_. So Perl 6 calls to it (typically from a 
: different file scope) won't provide the expected $_ anyway.

Most of the people treating $_ dynamically are doing it with subs
and not methods, I suspect.  That's where the policy is aimed.
The methods and such would only get caught up in the splash of a
general "sigless doesn't topicalize" rule.  You ask for everything
in @_, you're totally on your own, basically, just like in Perl 5.
(Except for the implied "is constant".)

Interestingly, there's no way to explicitly declare that you want the
invocant included in the slurpy array.  Maybe this could be forced
to grok it?

    method ([EMAIL PROTECTED]:)

But that's pretty lame.  It doesn't seem all that important to me
to support a way to declare this (other than leaving the sig out
entirely).

Larry

Reply via email to