[PATCH:xts 5/6] xts-config: Fix “Use of qw(...) as parentheses” warning.

Cyril Brulebois kibi at debian.org
Thu Dec 22 16:23:19 PST 2011


In Perl before 5.14, the following syntax was happily accepted:
  foreach my $foo qw(bar baz)

but that's been deprecated and that now generates a warning:
  Use of qw(...) as parentheses is deprecated at ./xts5/bin/xts-config line 118.

The correct form has always been:
  foreach my $foo (qw(bar baz))

and that's compatible with older Perl releases, so let's use that.

Reference:
  http://perldoc.perl.org/perl5140delta.html

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 xts5/bin/xts-config.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xts5/bin/xts-config.in b/xts5/bin/xts-config.in
index 4d00510..3d10c13 100755
--- a/xts5/bin/xts-config.in
+++ b/xts5/bin/xts-config.in
@@ -109,13 +109,13 @@ BEGIN
 
 	$::vars{"XT_PIXMAP_DEPTHS"} =~ s/,?\s+/ /g;
 
-	foreach my $var qw(TET_EXEC_IN_PLACE XT_EXTENSIONS
+	foreach my $var (qw(TET_EXEC_IN_PLACE XT_EXTENSIONS
 			XT_DOES_BACKING_STORE XT_DOES_SAVE_UNDERS
 			XT_POSIX_SYSTEM XT_TCP XT_LOCAL
 			XT_SAVE_SERVER_IMAGE XT_OPTION_NO_CHECK XT_OPTION_NO_TRACE
 			XT_DEBUG_OVERRIDE_REDIRECT XT_DEBUG_PAUSE_AFTER
 			XT_DEBUG_PIXMAP_ONLY XT_DEBUG_WINDOW_ONLY
-			XT_DEBUG_DEFAULT_DEPTHS XT_DEBUG_NO_PIXCHECK)
+			XT_DEBUG_DEFAULT_DEPTHS XT_DEBUG_NO_PIXCHECK))
 	{
 		$::vars{$var} = ucfirst (lc $::vars{$var}) if exists $::vars{$var};
 	}
-- 
1.7.7.3



More information about the xorg-devel mailing list