summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2022-07-10 10:52:33 -0400
committerZack Weinberg <zackw@panix.com>2022-07-10 10:52:33 -0400
commit61901a1a14fd50c03cfb1529d091554376fef286 (patch)
tree4aab8b051b63b156d166a878ed4010dd8d2062eb /lib
parentfec8a33d87bbe9f024a31a18642618716b7ad7c9 (diff)
downloadautoconf-61901a1a14fd50c03cfb1529d091554376fef286.tar.gz
Require Perl 5.10.0 or later.
The minimum Perl version was raised to 5.8.0 from 5.6.0 in commit 3a9802d60156809c139e9b4620bf04917e143ee2 (but not documented as such until e8c2d79ec42c70b6e4fa282bc0c024bf42f0585f, and not actually *enforced* by our own configure script until, er, now) in order to use Time::HiRes::stat. Unfortunately, while the Time::HiRes *module* was added in 5.8.0, it did not export a ‘stat’ function until 5.8.9. More precisely, this feature was added to Time::HiRes in version 1.92 of that module; Perl core 5.8.8 shipped Time::HiRes 1.86, 5.8.9 shipped 1.9715. The only system I have convenient access to, that has older Perls installed, offers me a choice of 5.8.8 or 5.10.1, so the new requirement means I cannot test with 5.8.x anymore. Per https://perldoc.perl.org/perlhist the release history of these versions of Perl is, in chronological order, 5.8.0 2002-Jul-18 5.8.8 2006-Jan-31 5.10.0 2007-Dec-18 5.8.9 2008-Dec-14 <-- almost a year later than 5.10.0 5.10.1 2009-Aug-22 5.12.0 2010-Apr-12 Per https://perldoc.perl.org/perl5101delta the differences between 5.10.0 and 5.10.1 are small, and do not make me worry about accidentally introducing code that works on my test boxes but not for our users, unlike the gulf between 5.8.x and 5.10.x. Requiring 5.10 will mean that we have access to Digest::SHA, the // and //= operators, the regexp \K escape, and ‘state’ variables (lexical scope, persistent value) all of which I can think of uses for (but none of them are actually used in this patch). Putting it all together, I think a requirement bump to version 5.10.0 is justified. We are already chopping off the trailing edge at 2006 due to the requirement for M4 1.4.8 (/de facto/ since 2.70) and late 2007 is still 15 years ago. This patch also makes configure search $PATH for executables named ‘perl5*’ and ‘perl-5.*’ if bare ‘perl’ is too old. To do this, it introduces a helper macro AClocal_PATH_PROG_GLOBS_FEATURE_CHECK, which I would *like* to promote to a new Autoconf feature, but I got stuck on quoting issues — see comments in m4/perl-time-hires.m4. * NEWS: Document requirement for Perl 5.10. * m4/perl-time-hires.m4: New file. * configure.ac: Use AC_PATH_PERL_WITH_TIME_HIRES_STAT to probe for perl. * build-aux/fetch.pl (fetch): For .pm files fetched from Automake, rewrite “use 5.006” to “use 5.010”. * build-aux/help-extract.pl * lib/Autom4te/C4che.pm * lib/Autom4te/ChannelDefs.pm * lib/Autom4te/Channels.pm * lib/Autom4te/Config.pm * lib/Autom4te/Configure_ac.pm * lib/Autom4te/FileUtils.pm * lib/Autom4te/General.pm * lib/Autom4te/Getopt.pm * lib/Autom4te/Request.pm * lib/Autom4te/XFile.pm * tests/mktests.pl: Change “use 5.006” to “use 5.010”.
Diffstat (limited to 'lib')
-rw-r--r--lib/Autom4te/C4che.pm2
-rw-r--r--lib/Autom4te/ChannelDefs.pm2
-rw-r--r--lib/Autom4te/Channels.pm2
-rw-r--r--lib/Autom4te/Config.pm2
-rw-r--r--lib/Autom4te/Configure_ac.pm2
-rw-r--r--lib/Autom4te/FileUtils.pm2
-rw-r--r--lib/Autom4te/General.pm2
-rw-r--r--lib/Autom4te/Getopt.pm2
-rw-r--r--lib/Autom4te/Request.pm2
-rw-r--r--lib/Autom4te/XFile.pm2
10 files changed, 10 insertions, 10 deletions
diff --git a/lib/Autom4te/C4che.pm b/lib/Autom4te/C4che.pm
index 9276eb60..8b7c3c11 100644
--- a/lib/Autom4te/C4che.pm
+++ b/lib/Autom4te/C4che.pm
@@ -31,7 +31,7 @@ This Perl module handles the cache of M4 runs used by autom4te.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/ChannelDefs.pm b/lib/Autom4te/ChannelDefs.pm
index 62e69323..6b60f205 100644
--- a/lib/Autom4te/ChannelDefs.pm
+++ b/lib/Autom4te/ChannelDefs.pm
@@ -44,7 +44,7 @@ shorthand function to output on specific channels.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm
index 83090e86..0dc39749 100644
--- a/lib/Autom4te/Channels.pm
+++ b/lib/Autom4te/Channels.pm
@@ -66,7 +66,7 @@ etc.) that can also be overridden on a per-message basis.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/Config.pm b/lib/Autom4te/Config.pm
index 405c671f..9d4c3d83 100644
--- a/lib/Autom4te/Config.pm
+++ b/lib/Autom4te/Config.pm
@@ -25,7 +25,7 @@ package Autom4te::Config;
# and autoconf's build machinery is not prepared to do that.
# Revisit after 2.70.
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm
index 78b161bc..5d6d80cb 100644
--- a/lib/Autom4te/Configure_ac.pm
+++ b/lib/Autom4te/Configure_ac.pm
@@ -20,7 +20,7 @@
package Autom4te::Configure_ac;
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
index 60b66cd6..14982a4a 100644
--- a/lib/Autom4te/FileUtils.pm
+++ b/lib/Autom4te/FileUtils.pm
@@ -34,7 +34,7 @@ This perl module provides various general purpose file handling functions.
=cut
-use 5.008;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/General.pm b/lib/Autom4te/General.pm
index 727f2975..a0f29043 100644
--- a/lib/Autom4te/General.pm
+++ b/lib/Autom4te/General.pm
@@ -32,7 +32,7 @@ used in several executables of the Autoconf package.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/Getopt.pm b/lib/Autom4te/Getopt.pm
index c32c2cce..1ef2f99c 100644
--- a/lib/Autom4te/Getopt.pm
+++ b/lib/Autom4te/Getopt.pm
@@ -30,7 +30,7 @@ line options in conformance to the GNU Coding standards.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/Request.pm b/lib/Autom4te/Request.pm
index 1641666d..c137ef21 100644
--- a/lib/Autom4te/Request.pm
+++ b/lib/Autom4te/Request.pm
@@ -32,7 +32,7 @@ used in several executables of the Autoconf and Automake packages.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';
diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm
index fcc0e68b..3b385c57 100644
--- a/lib/Autom4te/XFile.pm
+++ b/lib/Autom4te/XFile.pm
@@ -69,7 +69,7 @@ and C<getlines> methods to translate C<\r\n> to C<\n>.
=cut
-use 5.006;
+use 5.010;
use strict;
use warnings FATAL => 'all';