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