develooper Front page | | Postings from March 2005

Re: Test::META

Thread Previous | Thread Next
Christopher H. Laco
March 28, 2005 15:20
Re: Test::META
Message ID:
Michael G Schwern wrote:
> 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.

That's a matter of opinion; one I think should be left up to the person 
makeing Build.PL.

>>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?

See definition below from the docs on what build_requires [ambiguously] 

> 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?

Absolutely it's confusion.

> A YAML mapping indicating the Perl modules required for building and/or testing of this distribution. These dependencies are not required after the module is installed.

So, to me this means something like Test::More.
It absolutely has to be in place to some *.t files to ever work, or even 
load. Now granted the test may end up just skipping because Test::Strict 
isn't instealled. In that situation, I see Test::More just as required 

Maybe this is my issue. To me, building and testing are two different 
things. I don't have to test. Ever. By I do have to build the module.

build_requires is a bad place for test requirements, but recommends 
isn't right either.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About