This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id:
38443
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
cub.uanic [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
(no value)

Attachments


Sub Module::Install::Metadata::perl_version return incorrect result for two-digits input data (eg, "5.8"), which leads to errors with installing other modules (see http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg03971.html, for example). Patch included in attachment.
Subject: Module-Install-0.77-perl_version.patch
--- Module-Install-0.77/lib/Module/Install/Metadata.pm.orig 2008-08-08 18:55:14.000000000 +0300 +++ Module-Install-0.77/lib/Module/Install/Metadata.pm 2008-08-13 17:51:10.000000000 +0300 @@ -177,8 +177,9 @@ # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to # numbers (eg, 5.006001 or 5.008009). + # Also, convert double-part versions (eg, 5.8) - $version =~ s/^(\d+)\.(\d+)\.(\d+)$/sprintf("%d.%03d%03d",$1,$2,$3)/e; + $version =~ s/^(\d+)\.(\d+)(?:\.(\d+))?$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; $version =~ s/_.+$//; $version = $version + 0; # Numify
G'day Oleg, On Wed Aug 13 11:00:25 2008, CUB wrote:
Show quoted text
> Sub Module::Install::Metadata::perl_version return incorrect > result for two-digits input data (eg, "5.8"), which leads to errors > with installing other modules.
You're right! Thanks for spotting this.
Show quoted text
> Patch included in attachment.
Your patch looks good, so I've applied it as svn r4046, along with some extra test cases in t/07_perl_version.t. It should be included in Module::Install 0.78. If you can't wait for 0.78, you can grab the dev tree with: svn co http://svn.ali.as/cpan/trunk/Module-Install/ Module-Install All the very best, Paul


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.