From 28dc8e9339e21b847b4b10f74ba74386dee7d7ed Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Fri, 19 Aug 2011 08:57:07 +0200 Subject: [PATCH] Stop losing dependency version information cpanspec would unconditionally set the version requirement to 0 for Module::Build, ExtUtils::MakeMaker and dependencies detected in tests. This is not correct if the module already has specified a versioned dependency. --- cpanspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpanspec b/cpanspec index f7fc1fc..475cd0a 100755 --- a/cpanspec +++ b/cpanspec @@ -922,16 +922,16 @@ for my $file (@args) { #print STDERR "$testfile: @{[$extract_o_matic->array()]}\n"; for my $dep ($extract_o_matic->array()) { next if ($dep eq $module); - $build_requires{$dep}=0; + $build_requires{$dep} ||= 0; } } my $usebuildpl=0; if (grep /^Build\.PL$/, @files) { - $build_requires{'Module::Build'}=0; + $build_requires{'Module::Build'} ||= 0; $usebuildpl=1; } else { - $build_requires{'ExtUtils::MakeMaker'}=0; + $build_requires{'ExtUtils::MakeMaker'} ||= 0; } if (!$usebuildpl) {