New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module::CoreList::is_core("File::Spec::AmigaOS", "3.64") dies #16127
Comments
From ishigaki@cpan.orgCreated by ishigaki@cpan.orgperl -MModule::CoreList -E 'say Module::CoreList::is_core("File::Spec::AmigaOS", "3.64")' dies, saying "Invalid version format (version required)", because of an invalid version (;.64) for 5.023009. Perl Info
|
From @jkeenanOn Mon, 28 Aug 2017 06:02:02 GMT, ishigaki wrote:
This is probably a side-effect from a problem previously corrected. ##### [perl #127765] Fix bogus $File::Spec::AmigaOS::VERSION Inline Patchdiff --git a/dist/PathTools/lib/File/Spec/AmigaOS.pm b/dist/PathTools/lib/File/Spec/AmigaOS.pm
index 9182d5e..7a5889c 100644
--- a/dist/PathTools/lib/File/Spec/AmigaOS.pm
+++ b/dist/PathTools/lib/File/Spec/AmigaOS.pm
@@ -4,7 +4,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = ';.64';
+$VERSION = '3.64';
$VERSION =~ tr/_//d;
@ISA = qw(File::Spec::Unix);
I don't know enough about Module::CoreList::is_core() to know whether this is easily fixable. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Mon, 28 Aug 2017 15:44:49 GMT, jkeenan wrote:
The patch attached corrects the problem -- but since I've made mistakes with Module-CoreList patches in the past, I'd like to have it reviewed first. Thank you very much. -- |
From @jkeenan0001-Correct-badly-formatted-version-number.patchFrom 2c7c30d106222420e0e302b777edc8a263d939b3 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Mon, 28 Aug 2017 11:58:28 -0400
Subject: [PATCH] Correct badly formatted version number.
https://rt.perl.org/Ticket/Display.html?id=131976
---
dist/Module-CoreList/lib/Module/CoreList.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm
index 24bd67f..d2cf349 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -12349,7 +12349,7 @@ for my $version ( sort { $a <=> $b } keys %released ) {
'ExtUtils::Embed' => '1.33',
'File::Find' => '1.34',
'File::Glob' => '1.26',
- 'File::Spec::AmigaOS' => ';.64',
+ 'File::Spec::AmigaOS' => '3.64',
'IPC::Msg' => '2.06_01',
'IPC::Semaphore' => '2.06_01',
'IPC::SharedMem' => '2.06_01',
--
2.7.4
|
From @ilmari"James E Keenan via RT" <perlbug-followup@perl.org> writes:
While that fixes the immediate problem, it also causes Module::CoreList An alternative patch would be to make is_core() more robust against -- |
From @ilmaricorelist-version-error-fix.patchdiff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm
index 24bd67f9ef..9cc7c3dee9 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -14442,6 +14442,11 @@ sub is_core
# On the way if we pass the required module version, we can
# short-circuit and return true
if (defined($module_version)) {
+ my $module_version_object = eval { version->parse($module_version) };
+ if (!defined($module_version_object)) {
+ (my $err = $@) =~ s/^Invalid version format /Invalid version '$module_version' specified /;
+ die $err;
+ }
# The Perl releases aren't a linear sequence, but a tree. We need to build the path
# of releases from 5 to the specified release, and follow the module's version(s)
# along that path.
@@ -14459,7 +14464,7 @@ sub is_core
last RELEASE if $prn > $perl_version;
next unless defined(my $next_module_version
= $delta{$prn}->{changed}->{$module});
- return 1 if version->parse($next_module_version) >= version->parse($module_version);
+ return 1 if eval { version->parse($next_module_version) >= $module_version_object };
}
return 0;
}
|
The patch proposed by @ilmari in the ancestral RT ticket was applied as part of
Closing this issue. |
Migrated from rt.perl.org#131976 (status was 'open')
Searchable as RT131976$
The text was updated successfully, but these errors were encountered: