Skip to content

Commit d48b284

Browse files
avargitster
authored andcommitted
perl: bump the required Perl version to 5.8 from 5.6.[21]
Formalize our dependency on perl 5.8, bumped from 5.6.[12]. We already used the three-arg form of open() which was introduced in 5.6.1, but t/t9700/test.pl explicitly depended on 5.6.2. However git-add--interactive.pl has been failing on the 5.6 line since it was introduced in v1.5.0-rc0~12^2~2 back in 2006 due to this open syntax: sub run_cmd_pipe { my $fh = undef; open($fh, '-|', @_) or die; return <$fh>; } Which when executed dies on "Can't use an undefined value as filehandle reference". Several of our tests also fail on 5.6 (even more when compiled with NO_PERL_MAKEMAKER=1): t2016-checkout-patch.sh t3904-stash-patch.sh t3701-add-interactive.sh t7105-reset-patch.sh t7501-commit.sh t9700-perl-git.sh Our code is bitrotting on 5.6 with no-one interested in fixing it, and pinning us to such an ancient release of Perl is keeping us from using useful features introduced in the 5.8 release. The 5.6 series is now over 10 years old, and the 5.6.2 maintenance release almost 7. 5.8 on the other hand is more than 8 years old. All the modern Unix-like operating systems have now upgraded to it or a later version, and 5.8 packages are available for old IRIX, AIX Solaris and Tru64 systems. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Acked-by: Tor Arntsen <[email protected]> Acked-by: Randal L. Schwartz <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9027fa9 commit d48b284

14 files changed

+17
-6
lines changed

INSTALL

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ Issues of note:
6767
- A POSIX-compliant shell is required to run many scripts needed
6868
for everyday use (e.g. "bisect", "pull").
6969

70-
- "Perl" is needed to use some of the features (e.g. preparing a
71-
partial commit using "git add -i/-p", interacting with svn
72-
repositories with "git svn"). If you can live without these, use
73-
NO_PERL.
70+
- "Perl" version 5.8 or later is needed to use some of the
71+
features (e.g. preparing a partial commit using "git add -i/-p",
72+
interacting with svn repositories with "git svn"). If you can
73+
live without these, use NO_PERL.
7474

7575
- "openssl" library is used by git-imap-send to use IMAP over SSL.
7676
If you don't need it, use NO_OPENSSL.

git-add--interactive.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/perl -w
22

3+
use 5.008;
34
use strict;
45
use Git;
56

git-archimport.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ =head1 Devel Notes
5454
5555
=cut
5656

57+
use 5.008;
5758
use strict;
5859
use warnings;
5960
use Getopt::Std;

git-cvsexportcommit.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/perl -w
22

3+
use 5.008;
34
use strict;
45
use Getopt::Std;
56
use File::Temp qw(tempdir);

git-cvsimport.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# The head revision is on branch "origin" by default.
1414
# You can change that with the '-o' option.
1515

16+
use 5.008;
1617
use strict;
1718
use warnings;
1819
use Getopt::Long;

git-cvsserver.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
####
1616
####
1717

18+
use 5.008;
1819
use strict;
1920
use warnings;
2021
use bytes;

git-difftool.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#
1111
# Any arguments that are unknown to this script are forwarded to 'git diff'.
1212

13+
use 5.008;
1314
use strict;
1415
use warnings;
1516
use Cwd qw(abs_path);

git-relink.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# Scan two git object-trees, and hardlink any common objects between them.
88

9-
use 5.006;
9+
use 5.008;
1010
use strict;
1111
use warnings;
1212
use Getopt::Long;

git-send-email.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# and second line is the subject of the message.
1717
#
1818

19+
use 5.008;
1920
use strict;
2021
use warnings;
2122
use Term::ReadLine;

git-svn.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env perl
22
# Copyright (C) 2006, Eric Wong <[email protected]>
33
# License: GPL v2 or later
4+
use 5.008;
45
use warnings;
56
use strict;
67
use vars qw/ $AUTHOR $VERSION

gitweb/gitweb.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#
88
# This program is licensed under the GPLv2
99

10+
use 5.008;
1011
use strict;
1112
use warnings;
1213
use CGI qw(:standard :escapeHTML -nosticky);

perl/Git.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Git - Perl interface to the Git version control system
77

88
package Git;
99

10+
use 5.008;
1011
use strict;
1112

1213

t/t7006/test-terminal.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/perl
2+
use 5.008;
23
use strict;
34
use warnings;
45
use IO::Pty;

t/t9700/test.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
use lib (split(/:/, $ENV{GITPERLLIB}));
33

4-
use 5.006002;
4+
use 5.008;
55
use warnings;
66
use strict;
77

0 commit comments

Comments
 (0)