On Mon Nov 17 01:51:40 2008, ihrd wrote:
> Hi!
> I start that message like bug report, but I have doubt.
> 
> example:
> 
> class A {
>     method foo (@a) {
>         @a.grep: { say @a }; # just for example, real code not so
pointless
>     }
> }
> 
> my $o = A.new;
> 
> $o.foo(['foo']); # foo
> $o.foo([1, 2]); # foo
>                        # foo
> 
> Look like grep curls construct closure.
> Mb it`s all right in perl6?

This is yet-another lexicals bug, the same bug that causes an issue with
'gather' that masak reported in his use.perl post at
http://use.perl.org/~masak/journal/37871 .

So, I'm going to link this as "yet another lexicals bug" that I expect
to be fixed when the lexicals branch is finished.

Thanks!

Pm

Reply via email to