Subject: | build_requires not included in prerequisites |
CPANPLUS::Dist::Build doesn't include "build_requires" prerequisites specified in the Build.PL file. As these are necessary for building from source, they should be included with "requires" for prerequisite checking. Users preferring Build.PL in CPANPLUS will find their builds failing if they do not have all "build_requires" modules for a distribution already installed.
For comparison, Module::Build::Compat includes both "requires" and "build_requires" in "PREREQ_PM" in a Makefile.PL. See the attached patch for a fix.
--- Build.pm.orig 2005-07-30 10:11:36.000000000 -0400
+++ Build.pm 2005-07-30 10:12:25.000000000 -0400
@@ -357,7 +357,7 @@
my $self = $dist->parent;
### Lame++, at least return an empty hashref...
- my $prereqs = $mb->requires || {};
+ my $prereqs = { %{$mb->requires}, %{$mb->build_requires} } || {};
$self->status->prereqs( $prereqs );
return $prereqs;