I'll guess that you're pointing at
.:send_one($_);
Which supposedly uses "topic" to resolve .:send_one into $this.send_one. If that works, then I'm happy -- I like being able to control topic and $_ differently. But if C<for> changes topic, then what?
OUTER::.:send_one($_);
Yuck.
I believe it needs to be
method send ($self: [EMAIL PROTECTED]) { $self.:send_one("BEGIN"); for @data { $self.:send_one($_); } $self.:send_one("END"); }
While that works (I think it works anyway), its debatable if it's nice or not. The first and last calls to .:send_one shouldn't need the $self, but I put it there because if you use the $self inside the for in a method that short, it's nice and clear to have it outside it as well.
I suspect the original example expands the for loop into the equivalent of:
for @data -> $item { $item.:send_one($item); }
And it doesn't take a $larry to figure out that this isn't going to make the compiler very happy, as it's most likely a violation of class access control, I would have thought.
So Luke, am I right?