Skip to content

Commit

Permalink
perl: bump the required Perl version to 5.8.1 from 5.8.0
Browse files Browse the repository at this point in the history
The following commit will make use of a Getopt::Long feature which is
only present in Perl >= 5.8.1.  Document that as the minimum version we
support.

Many of our Perl scripts will continue to run with 5.8.0 but this change
allows us to adjust them as needed without breaking any promises to our
users.

The Perl requirement was last changed in d48b284 (perl: bump the
required Perl version to 5.8 from 5.6.[21], 2010-09-24).  At that time,
5.8.0 was 8 years old.  It is now over 21 years old.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
tmzullinger authored and gitster committed Nov 16, 2023
1 parent 43c8a30 commit d13a73e
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ For Perl programs:

- Most of the C guidelines above apply.

- We try to support Perl 5.8 and later ("use Perl 5.008").
- We try to support Perl 5.8.1 and later ("use Perl 5.008001").

- use strict and use warnings are strongly preferred.

Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Issues of note:
- A POSIX-compliant shell is required to run some scripts needed
for everyday use (e.g. "bisect", "request-pull").

- "Perl" version 5.8 or later is needed to use some of the
- "Perl" version 5.8.1 or later is needed to use some of the
features (e.g. sending patches using "git send-email",
interacting with svn repositories with "git svn"). If you can
live without these, use NO_PERL. Note that recent releases of
Expand Down
2 changes: 1 addition & 1 deletion contrib/diff-highlight/DiffHighlight.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package DiffHighlight;

use 5.008;
use 5.008001;
use warnings FATAL => 'all';
use strict;

Expand Down
2 changes: 1 addition & 1 deletion contrib/mw-to-git/Git/Mediawiki.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Git::Mediawiki;

use 5.008;
use 5.008001;
use strict;
use POSIX;
use Git;
Expand Down
2 changes: 1 addition & 1 deletion git-archimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ =head1 Devel Notes
=cut

use 5.008;
use 5.008001;
use strict;
use warnings;
use Getopt::Std;
Expand Down
2 changes: 1 addition & 1 deletion git-cvsexportcommit.perl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl

use 5.008;
use 5.008001;
use strict;
use warnings;
use Getopt::Std;
Expand Down
2 changes: 1 addition & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# The head revision is on branch "origin" by default.
# You can change that with the '-o' option.

use 5.008;
use 5.008001;
use strict;
use warnings;
use Getopt::Long;
Expand Down
2 changes: 1 addition & 1 deletion git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
####
####

use 5.008;
use 5.008001;
use strict;
use warnings;
use bytes;
Expand Down
4 changes: 2 additions & 2 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# and second line is the subject of the message.
#

use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Getopt::Long;
Expand Down Expand Up @@ -228,7 +228,7 @@ sub system_or_msg {
my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code);
if (defined $msg) {
# Quiet the 'redundant' warning category, except we
# need to support down to Perl 5.8, so we can't do a
# need to support down to Perl 5.8.1, so we can't do a
# "no warnings 'redundant'", since that category was
# introduced in perl 5.22, and asking for it will die
# on older perls.
Expand Down
2 changes: 1 addition & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Copyright (C) 2006, Eric Wong <normalperson@yhbt.net>
# License: GPL v2 or later
use 5.008;
use 5.008001;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use strict;
use vars qw/ $AUTHOR $VERSION
Expand Down
2 changes: 1 addition & 1 deletion gitweb/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Requirements
------------

- Core git tools
- Perl 5.8
- Perl 5.8.1
- Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
- web server

Expand Down
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This program is licensed under the GPLv2

use 5.008;
use 5.008001;
use strict;
use warnings;
# handle ACL in file access tests
Expand Down
2 changes: 1 addition & 1 deletion perl/Git.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Git - Perl interface to the Git version control system

package Git;

use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();

Expand Down
2 changes: 1 addition & 1 deletion perl/Git/I18N.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Git::I18N;
use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
BEGIN {
Expand Down
2 changes: 1 addition & 1 deletion perl/Git/LoadCPAN.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Git::LoadCPAN;
use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();

Expand Down
2 changes: 1 addition & 1 deletion perl/Git/LoadCPAN/Error.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Git::LoadCPAN::Error;
use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Git::LoadCPAN (
Expand Down
2 changes: 1 addition & 1 deletion perl/Git/LoadCPAN/Mail/Address.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Git::LoadCPAN::Mail::Address;
use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Git::LoadCPAN (
Expand Down
2 changes: 1 addition & 1 deletion perl/Git/Packet.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package Git::Packet;
use 5.008;
use 5.008001;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
BEGIN {
Expand Down
2 changes: 1 addition & 1 deletion t/t0202/test.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl
use 5.008;
use 5.008001;
use lib (split(/:/, $ENV{GITPERLLIB}));
use strict;
use warnings;
Expand Down
2 changes: 1 addition & 1 deletion t/t5562/invoke-with-content-length.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use 5.008;
use 5.008001;
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion t/t9700/test.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB}));

use 5.008;
use 5.008001;
use warnings;
use strict;

Expand Down
2 changes: 1 addition & 1 deletion t/test-terminal.perl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl
use 5.008;
use 5.008001;
use strict;
use warnings;
use IO::Pty;
Expand Down

0 comments on commit d13a73e

Please sign in to comment.