diff options
author | Zefram <zefram@fysh.org> | 2010-09-08 09:51:29 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-09-08 10:15:44 +0200 |
commit | ea25a9b2cf73948b1e8c5675de027e0ad13277bd (patch) | |
tree | 2b8bc87185e0e9e01b643752f911cdf4eeac0f85 /lib/Tie | |
parent | c99cfaa7c4ced6145d9642cd15da5bb2ea4ad19e (diff) | |
download | perl-ea25a9b2cf73948b1e8c5675de027e0ad13277bd.tar.gz |
make qw(...) first-class syntax
This makes a qw(...) list literal a distinct token type for the
parser, where previously it was munged into a "(",THING,")" sequence.
The change means that qw(...) can't accidentally supply parens to parts
of the grammar that want real parens. Due to many bits of code taking
advantage of that by "foreach my $x qw(...) {}", this patch also includes
a hack to coerce qw(...) to the old-style parenthesised THING, emitting
a deprecation warning along the way.
Diffstat (limited to 'lib/Tie')
-rw-r--r-- | lib/Tie/Scalar.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Tie/Scalar.t b/lib/Tie/Scalar.t index a8e803d1f5..9be536f8b3 100644 --- a/lib/Tie/Scalar.t +++ b/lib/Tie/Scalar.t @@ -22,7 +22,7 @@ use Test::More tests => 16; use_ok( 'Tie::Scalar' ); # these are "abstract virtual" parent methods -for my $method qw( TIESCALAR FETCH STORE ) { +for my $method (qw( TIESCALAR FETCH STORE )) { eval { Tie::Scalar->$method() }; like( $@, qr/doesn't define a $method/, "croaks on inherited $method()" ); } |