Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not interpolate bare @vars
  • Loading branch information
sorear committed May 16, 2011
1 parent 772e83c commit 3fd8a5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/STD.pm6
Expand Up @@ -4200,6 +4200,7 @@ grammar Q is STD {
:my $*QSIGIL ::= '@';
<?before '@'>
[ :lang(%*LANG<MAIN>) <EXPR(item %methodcall)> | <!> ] # trap ABORTBRANCH from variable's ::
<?after <[ \] } > ) ]> >
}
}

Expand All @@ -4212,6 +4213,7 @@ grammar Q is STD {
:my $*QSIGIL ::= '%';
<?before '%'>
[ :lang(%*LANG<MAIN>) <EXPR(item %methodcall)> | <!> ]
<?after <[ \] } > ) ]> >
}
}

Expand All @@ -4224,6 +4226,7 @@ grammar Q is STD {
:my $*QSIGIL ::= '&';
<?before '&'>
[ :lang(%*LANG<MAIN>) <EXPR(item %methodcall)> | <!> ]
<?after <[ \] } > ) ]> >
}
}

Expand Down
3 changes: 3 additions & 0 deletions test2.pl
Expand Up @@ -160,6 +160,9 @@

sub foo($x is rw) { $x }
dies_ok { foo 5 }, "cannot rw-bind constant";

my @foo = 1,2,3; #OK
is "@foo", '@foo', '@-vars do not interpolate';
}

#is $?FILE, 'test.pl', '$?FILE works';
Expand Down

0 comments on commit 3fd8a5d

Please sign in to comment.