Skip to content

Commit 0f54b7d

Browse files
avargitster
authored andcommitted
gitweb/gitweb.perl: remove use of qw(...) as parentheses
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 3562198 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 Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Acked-by: Jakub Narębski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 759e84f commit 0f54b7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,7 +3501,7 @@ sub print_feed_meta {
35013501
$href_params{'-title'} = 'log';
35023502
}
35033503

3504-
foreach my $format qw(RSS Atom) {
3504+
foreach my $format (qw(RSS Atom)) {
35053505
my $type = lc($format);
35063506
my %link_attr = (
35073507
'-rel' => 'alternate',
@@ -3682,7 +3682,7 @@ sub git_footer_html {
36823682
}
36833683
$href_params{'-title'} ||= 'log';
36843684

3685-
foreach my $format qw(RSS Atom) {
3685+
foreach my $format (qw(RSS Atom)) {
36863686
$href_params{'action'} = lc($format);
36873687
print $cgi->a({-href => href(%href_params),
36883688
-title => "$href_params{'-title'} $format feed",

0 commit comments

Comments
 (0)