On Fri, May 09, 2008 at 06:47:12PM -0500, Patrick R. Michaud wrote:
> On Thu, May 08, 2008 at 11:28:36AM -0700, Moritz Lenz wrote:
> > Rakudo as of r27393 can't handle multiple declarations in a single "my":
> > 
> > > my (@a, @b); say @a
> > Scope  not found for PAST::Var '@a'
> 
> We'll work on this one.
> 
> > > my @a, @b; say @a
> > Scope  not found for PAST::Var '@b'
> 
> Rakudo has this one correct -- according to S03, scoping
> multiple variables with 'my' requires the parens:
> 
> :    my $a;                  # okay
> :    my ($b, $c);            # okay
> :    my ($b = 1, $c = 2);    # okay - "my" intializers assign at runtime
> :    my $b, $c;              # wrong: "Use of undeclared variable: $c"

But is that really the error message you want to be giving for that syntax
error? The double spaces suggest that something internal isn't even
interpolating as expected, due to a the string form of a name being missing.

Nicholas Clark

Reply via email to