develooper Front page | perl.qa | Postings from March 2005

Re: Test::META

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
March 28, 2005 15:11
Subject:
Re: Test::META
Message ID:
20050328231052.GA14928@windhund.schwern.org
On Mon, Mar 28, 2005 at 08:42:50AM -0500, Christopher H. Laco wrote:
> That's another gripe of mine about M::B and create_makefile_pl.
> It puts the requires AND build_requires in the PREREQ_PM in the 
> Makefile.PL, which I won't want; nor do I think it right for everyone.

There is no build_requires or recommends equivalent in MakeMaker, nor will 
there be, so putting it into PREREQ_PM is the best thing to do.  That's
what every MakeMaker-based module on CPAN does after all.

Its better than just dropping it and having the build fail.


> Take Test::More for example. It's usually a build_requires and the other 
> Test* things like Test::Strict, Apache::Test, etc are in recommends. 
> Test probably won't run with Test::More, but skipping a few subtests 
> based on recommends is ok. But I don't think build_requires should be a 
> PREREQ_PM requirement at all.

*scratch head* but if you don't have the modules necessary to BUILD the
module (as opposed to those necessary to run it)... how are you going to 
build it?


> For that matter, it's not really clear what the expected outcome of a 
> missing build_requires requirement is as far as CPAN/CPANPLUS is concerned.

I'd think it would be the same as a missing requires or PREREQ_PM 
requirement.  CPAN shells build modules.  If they don't have the
prerequisites to do that... well then things won't work.  I don't know if
the CPAN shells will attempt to build the module anyway or just refuse,
but the introduction of build_requires doesn't change that behavior.


Maybe there's some confusion here as to what "build_requires" means?
Perhaps you're confusing it with the (possibly mythological) test_requires
and test_recommends?

Or maybe you're thinking its "Module::Build requires"?


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About