perl: bump the required Perl version to 5.8.1 from 5.8.0

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 d48b284183 (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>
This commit is contained in:
Todd Zullinger 2023-11-16 14:30:10 -05:00 committed by Junio C Hamano
parent 43c8a30d15
commit d13a73e383
22 changed files with 23 additions and 23 deletions

View file

@ -490,7 +490,7 @@ For Perl programs:
- Most of the C guidelines above apply. - 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. - use strict and use warnings are strongly preferred.

View file

@ -119,7 +119,7 @@ Issues of note:
- A POSIX-compliant shell is required to run some scripts needed - A POSIX-compliant shell is required to run some scripts needed
for everyday use (e.g. "bisect", "request-pull"). 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", features (e.g. sending patches using "git send-email",
interacting with svn repositories with "git svn"). If you can interacting with svn repositories with "git svn"). If you can
live without these, use NO_PERL. Note that recent releases of live without these, use NO_PERL. Note that recent releases of

View file

@ -1,6 +1,6 @@
package DiffHighlight; package DiffHighlight;
use 5.008; use 5.008001;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
use strict; use strict;

View file

@ -1,6 +1,6 @@
package Git::Mediawiki; package Git::Mediawiki;
use 5.008; use 5.008001;
use strict; use strict;
use POSIX; use POSIX;
use Git; use Git;

View file

@ -54,7 +54,7 @@ =head1 Devel Notes
=cut =cut
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
use Getopt::Std; use Getopt::Std;

View file

@ -1,6 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
use Getopt::Std; use Getopt::Std;

View file

@ -13,7 +13,7 @@
# The head revision is on branch "origin" by default. # The head revision is on branch "origin" by default.
# You can change that with the '-o' option. # You can change that with the '-o' option.
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
use Getopt::Long; use Getopt::Long;

View file

@ -15,7 +15,7 @@
#### ####
#### ####
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
use bytes; use bytes;

View file

@ -16,7 +16,7 @@
# and second line is the subject of the message. # and second line is the subject of the message.
# #
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Getopt::Long; use Getopt::Long;
@ -228,7 +228,7 @@ sub system_or_msg {
my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code); my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code);
if (defined $msg) { if (defined $msg) {
# Quiet the 'redundant' warning category, except we # 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 # "no warnings 'redundant'", since that category was
# introduced in perl 5.22, and asking for it will die # introduced in perl 5.22, and asking for it will die
# on older perls. # on older perls.

View file

@ -1,7 +1,7 @@
#!/usr/bin/perl #!/usr/bin/perl
# Copyright (C) 2006, Eric Wong <normalperson@yhbt.net> # Copyright (C) 2006, Eric Wong <normalperson@yhbt.net>
# License: GPL v2 or later # License: GPL v2 or later
use 5.008; use 5.008001;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use strict; use strict;
use vars qw/ $AUTHOR $VERSION use vars qw/ $AUTHOR $VERSION

View file

@ -29,7 +29,7 @@ Requirements
------------ ------------
- Core git tools - Core git tools
- Perl 5.8 - Perl 5.8.1
- Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename. - Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
- web server - web server

View file

@ -7,7 +7,7 @@
# #
# This program is licensed under the GPLv2 # This program is licensed under the GPLv2
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
# handle ACL in file access tests # handle ACL in file access tests

View file

@ -7,7 +7,7 @@ =head1 NAME
package Git; package Git;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();

View file

@ -1,5 +1,5 @@
package Git::I18N; package Git::I18N;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
BEGIN { BEGIN {

View file

@ -1,5 +1,5 @@
package Git::LoadCPAN; package Git::LoadCPAN;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();

View file

@ -1,5 +1,5 @@
package Git::LoadCPAN::Error; package Git::LoadCPAN::Error;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Git::LoadCPAN ( use Git::LoadCPAN (

View file

@ -1,5 +1,5 @@
package Git::LoadCPAN::Mail::Address; package Git::LoadCPAN::Mail::Address;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Git::LoadCPAN ( use Git::LoadCPAN (

View file

@ -1,5 +1,5 @@
package Git::Packet; package Git::Packet;
use 5.008; use 5.008001;
use strict; use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
BEGIN { BEGIN {

View file

@ -1,5 +1,5 @@
#!/usr/bin/perl #!/usr/bin/perl
use 5.008; use 5.008001;
use lib (split(/:/, $ENV{GITPERLLIB})); use lib (split(/:/, $ENV{GITPERLLIB}));
use strict; use strict;
use warnings; use warnings;

View file

@ -1,4 +1,4 @@
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;

View file

@ -1,7 +1,7 @@
#!/usr/bin/perl #!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB})); use lib (split(/:/, $ENV{GITPERLLIB}));
use 5.008; use 5.008001;
use warnings; use warnings;
use strict; use strict;

View file

@ -1,5 +1,5 @@
#!/usr/bin/perl #!/usr/bin/perl
use 5.008; use 5.008001;
use strict; use strict;
use warnings; use warnings;
use IO::Pty; use IO::Pty;