How to specify test conditions in ExtUtils :: MakeMaker Makefile.PL

PREREQ_PM sets runtime prerequisites, but how do you specify which modules are needed to run test cases?

Should I use BUILD_REQUIRESfor this?

+5
source share
3 answers

From ExtUtils :: MakeMaker 6.64 there is a parameter TEST_REQUIRES.

use ExtUtils::MakeMaker 6.64;

WriteMakefile(
    ...,
    TEST_REQUIRES => {
        Test::More => 0.95,
        },
    ...,
    );
+4
source

CPAN :: Meta :: Spec defines how modules communicate their prerequisites for the tool chain. The version 2 specification reworked the way in which the prerequisites are listed . Phase testnow has its own prerequisite list.

MakeMaker v2 , , . v2, , Dist:: Zilla ( , ).

CPAN:: Meta:: Converter v2 v1.4, test build_requires.

, MakeMaker, , , build_requires. PREREQ_PM , .

+3

, PREREQ_PM, , .

If I need modules for some tests, but they are not needed to run the module, I find them when the tests run, and I skip tests (using PASS) if I cannot find them.

I do not think that ExtUtils :: MakeMaker has any field for what you want.

+1
source

All Articles