git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb/gitweb.perl: remove use of qw(...) as parentheses
@ 2011-02-19 14:10 Ævar Arnfjörð Bjarmason
  2011-02-19 15:27 ` [PATCH v2 0/3] Fix failure-causing warnings in Gitweb + improve gitweb-lib.sh Ævar Arnfjörð Bjarmason
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-02-19 14:10 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jakub Narebski,
	Ævar Arnfjörð Bjarmason

Using the qw(...) construct as implicit parentheses was deprecated in
perl 5.13.5. Change the relevant code in gitweb to not use the
deprecated construct. The offending code was introduced in 3562198b by
Jakub Narebski.

The issue is that perl will now warn about this:

    $ perl -wE 'for my $i qw(a b) { say $i }'
    Use of qw(...) as parentheses is deprecated at -e line 1.
    a
    b

This caused gitweb.perl to warn on perl 5.13.5 and above, and these
tests to fail on those perl versions:

    ./t9501-gitweb-standalone-http-status.sh           (Wstat: 256 Tests: 11 Failed: 10)
      Failed tests:  2-11
      Non-zero exit status: 1
    ./t9502-gitweb-standalone-parse-output.sh          (Wstat: 256 Tests: 10 Failed: 9)
      Failed tests:  2-10
      Non-zero exit status: 1
    ./t9500-gitweb-standalone-no-errors.sh             (Wstat: 256 Tests: 90 Failed: 84)
      Failed tests:  1-8, 10-36, 38-45, 47-48, 50-88
      Non-zero exit status: 1

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 gitweb/gitweb.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0779f12..b02372c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3501,7 +3501,7 @@ sub print_feed_meta {
 			$href_params{'-title'} = 'log';
 		}
 
-		foreach my $format qw(RSS Atom) {
+		foreach my $format (qw(RSS Atom)) {
 			my $type = lc($format);
 			my %link_attr = (
 				'-rel' => 'alternate',
@@ -3682,7 +3682,7 @@ sub git_footer_html {
 		}
 		$href_params{'-title'} ||= 'log';
 
-		foreach my $format qw(RSS Atom) {
+		foreach my $format (qw(RSS Atom)) {
 			$href_params{'action'} = lc($format);
 			print $cgi->a({-href => href(%href_params),
 			              -title => "$href_params{'-title'} $format feed",
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-02-21  6:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-19 14:10 [PATCH] gitweb/gitweb.perl: remove use of qw(...) as parentheses Ævar Arnfjörð Bjarmason
2011-02-19 15:27 ` [PATCH v2 0/3] Fix failure-causing warnings in Gitweb + improve gitweb-lib.sh Ævar Arnfjörð Bjarmason
2011-02-19 15:27 ` [PATCH v2 1/3] t/gitweb-lib.sh: print to stderr when gitweb_run has errors Ævar Arnfjörð Bjarmason
2011-02-19 15:46   ` Jakub Narebski
2011-02-19 16:17     ` Ævar Arnfjörð Bjarmason
2011-02-19 18:16       ` Jakub Narebski
2011-02-19 19:11         ` Ævar Arnfjörð Bjarmason
2011-02-21  6:40         ` Junio C Hamano
2011-02-19 15:27 ` [PATCH v2 2/3] gitweb/gitweb.perl: remove use of qw(...) as parentheses Ævar Arnfjörð Bjarmason
2011-02-19 15:54   ` Jakub Narebski
2011-02-19 16:02     ` Jakub Narebski
2011-02-19 16:06     ` Ævar Arnfjörð Bjarmason
2011-02-20 14:42       ` Jakub Narebski
2011-02-19 15:27 ` [PATCH v2 3/3] gitweb/gitweb.perl: don't call S_ISREG() with undef Ævar Arnfjörð Bjarmason
2011-02-19 15:57   ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).