From 038c245ee56ceadec972a89e825941ced563a652 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 18 Apr 2011 15:20:48 +0000 Subject: [PATCH] pod/perldelta.pod: clarify "Use of qw(...) as parentheses" deprecation Clarify the note about qw(...) as parentheses deprecation. Without being clarified this could be misunderstood to deprecate most uses of qw(...). This came up on the Git mailing list[1] after I submitted a patch[2] to fix this issue in Gitweb[3]. 1. http://permalink.gmane.org/gmane.comp.version-control.git/167293 2. http://permalink.gmane.org/gmane.comp.version-control.git/167283 3. http://permalink.gmane.org/gmane.comp.version-control.git/167297 --- pod/perldelta.pod | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 500789d..7b262d7 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -938,6 +938,27 @@ parentheses, like this: for $x (qw(a b c)) { ... } +This is being deprecated because C is supposed to mean +C<"a", "b", "c"> not C<("a", "b", "c")>. I.e. this doesn't compile: + + for my $i "a", "b", "c" { } + +So neither should this: + + for my $i qw(a b c) {} + +But these both work: + + for my $i ("a", "b", "c") { } + for my $i (qw(a b c)) {} + +Note that this does not change the behavior of cases like: + + use POSIX qw(setlocale localeconv) + our @EXPORT = qw(foo bar baz); + +Where a list with our without parentheses could have been provided. + =head2 C<\N{BELL}> This is because Unicode is using that name for a different character. -- 1.8.3.1