Skip Menu |

This queue is for tickets about the CPANPLUS-Dist-Build CPAN distribution.

Report information
The Basics
Id: 13926
Status: resolved
Priority: 0/
Queue: CPANPLUS-Dist-Build

People
Owner: Nobody in particular
Requestors: dagolden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



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;
From: KWILLIAMS [...] cpan.org
The SVN version of the code currently has this, which should be equivalent: my $prereqs = {}; foreach my $type ('requires', 'build_requires') { my $p = $mb->$type() || {}; $prereqs->{$_} = $p->{$_} foreach keys %$p; } We just need to get the SVN code into some passable form somehow so we can release it... -Ken