You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
The rationale to remove the for qw() syntax was bogus and annoying.
re-instate it for for loops, but not for the rest.
do not insist on the backwards syntax to require (qw( ... )) around the for list.
Keep qw() as list for for and foreach but not as lists for
if, given, when, while, until, elsif and function calls.
Use of qw(...) as parentheses is disallowed for:
if qw(a) {}
unless qw(a) {}
if (0) {} elsif qw(a) {}
given qw(a) {}
when qw(a) {}
while qw(a) {}
until qw(a) {}
$obj->meth qw(a b c)
do foo qw(a b c)
do $subref qw(a b c)
&foo qw(a b c)
$a[0] qw(a b c)
but allowed for (foreach also):
for qw(a b c) {}
for $x qw(a b c) {}
for my $x qw(a b c) {}
for my \$x qw(a b c) {}
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.