Skip to content

Commit

Permalink
merge Makefile.PL BUILD_REQUIRES instead of deleting it
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg authored and rjbs committed Apr 25, 2010
1 parent 97e8d53 commit 2e47b6c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/Dist/Zilla/Plugin/MakeMaker.pm
Expand Up @@ -36,8 +36,18 @@ use ExtUtils::MakeMaker {{ $eumm_version }};
my {{ $WriteMakefileArgs }}
delete $WriteMakefileArgs{BUILD_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.56) };
unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
my $pp = $WriteMakefileArgs{PREREQ_PM};
for my $mod ( keys %$br ) {
if ( exists $pp->{$mod} ) {
$pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
}
else {
$pp->{$mod} = $br->{$mod};
}
}
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
Expand Down

0 comments on commit 2e47b6c

Please sign in to comment.