This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make qw(...) first-class syntax
authorZefram <zefram@fysh.org>
Wed, 8 Sep 2010 07:51:29 +0000 (09:51 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Wed, 8 Sep 2010 08:15:44 +0000 (10:15 +0200)
commitea25a9b2cf73948b1e8c5675de027e0ad13277bd
tree2b8bc87185e0e9e01b643752f911cdf4eeac0f85
parentc99cfaa7c4ced6145d9642cd15da5bb2ea4ad19e
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.
15 files changed:
embed.fnc
embed.h
lib/Tie/Scalar.t
lib/unicore/mktables
perly.act
perly.h
perly.tab
perly.y
pod/perldiag.pod
proto.h
t/lib/warnings/perly
t/op/list.t
t/op/studytied.t
t/op/switch.t
toke.c