Permalink
Browse files

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.
  • Loading branch information...
1 parent c406955 commit 28dc8e9339e21b847b4b10f74ba74386dee7d7ed @seveas committed Aug 19, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 cpanspec
View
@@ -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) {

0 comments on commit 28dc8e9

Please sign in to comment.