Skip to content
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

Fix Perl version lookup with Module::CoreList #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ppisar
Copy link

@ppisar ppisar commented May 6, 2019

If a distribution declares a dependency on '5.010' Perl,
inc::Module::Install dies in
Module::Install::Admin::ScanDeps::scan_dependencies() with:

Module::CoreList has no information on perl 5.010 at /usr/lib/perl5/ site_perl/5.10.1/Module/Install/Admin/ScanDeps.pm line 25.

This is because %Module::CoreList::version is indiced only with some
arbitrary versions and normalized numeral versions only. E.g. it
contains an entry for 5.005, 5.005000 and 5.010000 but no entry of 5.010.

This patch fixes the lookup by converting a version string into
a numeral.

https://rt.cpan.org/Public/Bug/Display.html?id=71565
#47

If a distribution declares a dependency on '5.010' Perl,
inc::Module::Install dies in
Module::Install::Admin::ScanDeps::scan_dependencies() with:

Module::CoreList has no information on perl 5.010 at /usr/lib/perl5/ site_perl/5.10.1/Module/Install/Admin/ScanDeps.pm line 25.

This is because %Module::CoreList::version is indiced only with some
arbitrary versions and normalized numeral versions only. E.g. it
contains an entry for 5.005, 5.005000 and 5.010000 but no entry of 5.010.

This patch fixes the lookup by converting a version string into
a numeral.

https://rt.cpan.org/Public/Bug/Display.html?id=71565
Perl-Toolchain-Gang#47
@Grinnz
Copy link
Contributor

Grinnz commented May 6, 2019

It really should use version->parse($perl_version)->numify, rather than the regex and such. But I guess that would require bundling version.pm. This is nice and unobtrusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants