Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 133489
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 7.47_07
Fixed in: (no value)



Subject: Invalid MIN_PERL_VERSION triggers a fatal error since v7.47_07
Distributions that have in illegal MIN_PERL_VERSION value (e.g. "5.008_001" in URI-Fetch-0.13) started to fail to build with ExtUtils-MakeMaker-7.48: [test@fedora-34 URI-Fetch-0.13]$ perl Makefile.PL Checking if your kit is complete... Looks good Warning: MIN_PERL_VERSION is not in a recognized format. Recommended is a quoted numerical value like '5.005' or '5.008001'. [test@fedora-34 URI-Fetch-0.13]$ echo $? 2 The new behavior was introduced with this commit: commit 06c035970e07afba9045463afba2f524ae8232d3 Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date: Mon Aug 3 19:05:35 2020 +0100 Add 'use warnings' to all the modules Because Changes file does not mention it, I believe it's not intentional. Moreover the message is worded as a warning, but it's handled as a fatal error. Although MIN_PERL_VERSION is documented as: Either the 5.006001 or the 5.6.1 format is acceptable. Any opinions how to deal with it?
There is already a test in t/min_perl_version.t for it: $warnings = ''; eval { WriteMakefile( NAME => 'Min::PerlVers', MIN_PERL_VERSION => 'foobar', ); }; is( $@, <<'END', 'Invalid MIN_PERL_VERSION is fatal' ); Warning: MIN_PERL_VERSION is not in a recognized format. Recommended is a quoted numerical value like '5.005' or '5.008001'. END But it passed even before the change, because t/min_perl_version.t has always started with "use warnings;". I'm keen to preserve the new behavior, but I'd like to change a wording of the message like in the attached patch.
Subject: 0001-MIN_PERL_VERSION-is-not-in-a-recognized-format-is-a-.patch
From 0cd15b2ba0a4f3aa1935398430d3a5d8eda9f065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 8 Oct 2020 11:18:36 +0200 Subject: [PATCH] "MIN_PERL_VERSION is not in a recognized format" is a fatal error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CPAN RT#133489 Signed-off-by: Petr Písař <ppisar@redhat.com> --- lib/ExtUtils/MakeMaker.pm | 2 +- t/min_perl_version.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index c2d50968..22f2c905 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -540,7 +540,7 @@ sub new { if (!$perl_version_ok) { if (!defined $perl_version_ok) { die <<'END'; -Warning: MIN_PERL_VERSION is not in a recognized format. +MakeMaker FATAL: MIN_PERL_VERSION is not in a recognized format. Recommended is a quoted numerical value like '5.005' or '5.008001'. END } diff --git a/t/min_perl_version.t b/t/min_perl_version.t index 8c8f801d..46a8d606 100644 --- a/t/min_perl_version.t +++ b/t/min_perl_version.t @@ -158,7 +158,7 @@ END ); }; is( $@, <<'END', 'Invalid MIN_PERL_VERSION is fatal' ); -Warning: MIN_PERL_VERSION is not in a recognized format. +MakeMaker FATAL: MIN_PERL_VERSION is not in a recognized format. Recommended is a quoted numerical value like '5.005' or '5.008001'. END -- 2.25.4
Is this considered invalid? MIN_PERL_VERSION => "v5.10" That's in Authen-Radius and triggers this issue. Removing the quotes makes it pass.
Subject: Re: [rt.cpan.org #133489] Invalid MIN_PERL_VERSION triggers a fatal error since v7.47_07
Date: Thu, 8 Oct 2020 15:09:32 +0200
To: "http://pghmcfc.id.fedoraproject.org/ via RT" <bug-ExtUtils-MakeMaker [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Thu, Oct 08, 2020 at 07:37:57AM -0400, http://pghmcfc.id.fedoraproject.org/ via RT wrote: Show quoted text
> Is this considered invalid? > > MIN_PERL_VERSION => "v5.10" > > That's in Authen-Radius and triggers this issue. Removing the quotes makes it pass. >
"v5.10" is a string. v5.10 is a v-string. ExtUtils::MakeMaker handles them differently: V-strings undergo conversion into version object, version object overloads a numeric less-then operator and thus the comparison does not yield any warning and ExtUtils::MakeMaker considers it valid. On the other hand, strings undergo substitution to a decimal format if they look like a 3-dot string (m{ ^v? (\d+) \. (\d+) \. (\d+) $ }), and then they are compared with the same numeric less-then operator. The operator yields a warning in case of "v5.10", because it does not look like a number. This is how ExtUtils::MakeMaker behaves. If you consider MIN_PERL_VERSION documentation: Either the 5.006001 or the 5.6.1 format is acceptable. it's clearly an invalid value for ExtUtils::MakeMaker. The code and the documentation are in line. v5.10 is a valid v-string and a valid value for the version objects. "v5.10" is a valid value for the version objects. But not for ExtUtils::MakeMaker. The question is whether ExtUtils::MakeMaker wants to support them. It supports v5.10 just by accident. It does not support dotted strings that do not have exactly 3 dots. I'm not against changing ExtUtils::MakeMaker to pass all values to a version constructor. But there can be some reasons for why not to do it that I'm not aware of. Maybe performance? Maybe compatibility with old Perls with old version modules? -- Petr
On Thu Oct 08 09:16:19 2020, ppisar wrote: Show quoted text
> The question is whether ExtUtils::MakeMaker wants to support them. It > supports > v5.10 just by accident. It does not support dotted strings that do not > have > exactly 3 dots. I'm not against changing ExtUtils::MakeMaker to pass > all > values to a version constructor. But there can be some reasons for why > not to > do it that I'm not aware of. Maybe performance? Maybe compatibility > with old > Perls with old version modules?
It's quite likely that it's just an oversight. -Dan
On 2020-10-08 10:54:47, DBOOK wrote: Show quoted text
> On Thu Oct 08 09:16:19 2020, ppisar wrote:
> > The question is whether ExtUtils::MakeMaker wants to support them. It > > supports > > v5.10 just by accident. It does not support dotted strings that do not > > have > > exactly 3 dots. I'm not against changing ExtUtils::MakeMaker to pass > > all > > values to a version constructor. But there can be some reasons for why > > not to > > do it that I'm not aware of. Maybe performance? Maybe compatibility > > with old > > Perls with old version modules?
> > It's quite likely that it's just an oversight. > > -Dan > >
Also affected: App-Sets-0.976 https://github.com/polettix/App-sets/issues/1 Atto-0.004 https://github.com/robn/Atto/issues/1 Catalyst-Controller-WrapCGI-0.038 133577 Data-Crumbr-0.1.1 133578 Log-Tree-0.18 https://github.com/dominikschulz/Log-Tree/issues/4 Net-RackSpace-CloudServers-0.15 https://github.com/mfontani/Net-RackSpace-CloudServers/issues/9 P2-Scheduler-0.07 133574 Perl-Core-0.0100 https://github.com/aanari/Perl-Core/issues/2 WWW-Pusher-Client-0.04 https://github.com/honeydew-sc/WWW-Pusher-Client/issues/2 XML-Quick-0.07 133580
On Wed Oct 21 02:28:24 2020, SREZIC wrote: Show quoted text
> On 2020-10-08 10:54:47, DBOOK wrote:
> > On Thu Oct 08 09:16:19 2020, ppisar wrote:
> > > The question is whether ExtUtils::MakeMaker wants to support them. > > > It > > > supports > > > v5.10 just by accident. It does not support dotted strings that do > > > not > > > have > > > exactly 3 dots. I'm not against changing ExtUtils::MakeMaker to > > > pass > > > all > > > values to a version constructor. But there can be some reasons for > > > why > > > not to > > > do it that I'm not aware of. Maybe performance? Maybe compatibility > > > with old > > > Perls with old version modules?
> > > > It's quite likely that it's just an oversight. > > > > -Dan > > > >
> > Also affected: > > App-Sets-0.976 > https://github.com/polettix/App-sets/issues/1 > Atto-0.004 > https://github.com/robn/Atto/issues/1 > Catalyst-Controller-WrapCGI-0.038 133577 > Data-Crumbr-0.1.1 133578 > Log-Tree-0.18 > https://github.com/dominikschulz/Log-Tree/issues/4 > Net-RackSpace-CloudServers-0.15 > https://github.com/mfontani/Net-RackSpace-CloudServers/issues/9 > P2-Scheduler-0.07 133574 > Perl-Core-0.0100 > https://github.com/aanari/Perl-Core/issues/2 > WWW-Pusher-Client-0.04 https://github.com/honeydew- > sc/WWW-Pusher-Client/issues/2 > XML-Quick-0.07 133580
These should all be fixed by EUMM 7.49_03.