On Fri Oct 07 10:24:37 2011, coke wrote:
> On Sun Jul 11 07:07:52 2010, masak wrote:
> > <masak> rakudo: sub foo { my $y; our sub bar { say $y } }; bar
> > <p6eval> rakudo 7579f7:  ( no output )
> > <masak> this is problematic in my model. :/
> > <masak> and seemingly in Rakudo's, too :)
> > <masak> locally, Null PMC access.
> > * masak submits rakudobug
> 
> This no longer generates an NPA:
> 
> 13:18 < [Coke]> rakudo: sub foo { my $y; our sub bar { say $y } }; bar
> 13:18 <+p6eval> rakudo 1c2c2d: OUTPUT«Could not find sub &bar␤  in 
> block <anon>
>                 at /tmp/SRJiCVZA9p:1␤  in <anon> at 
> /tmp/SRJiCVZA9p:1␤»
> 
> But moritz thinks this is still incorrect behavior.

For what it's worth, I don't think it's incorrect behavior. Perl 6 
semantics *used* to find &bar in the above case, but no longer does. 
(This is part of a general trend of Perl 6 leaning more and more heavily 
on lexical scoping as a guiding principle.) I think the change happened 
somewhere around the nqp-rx/Rakudo Star transition.


Reply via email to