如何在ExtUtils :: MakeMaker Makefile.PL中指定测试先决条件 [英] How to specify test prerequisites in the ExtUtils::MakeMaker Makefile.PL

查看:52
本文介绍了如何在ExtUtils :: MakeMaker Makefile.PL中指定测试先决条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PREREQ_PM指定运行时先决条件,但是如何指定运行测试用例所需的模块?

PREREQ_PM specifies the runtime prerequisites, but how to specify which modules are required to run the test cases?

我应该为此使用BUILD_REQUIRES吗?

推荐答案

ExtUtils: :MakeMaker 6.64,有一个TEST_REQUIRES参数.

As of ExtUtils::MakeMaker 6.64, there is a TEST_REQUIRES parameter.

use ExtUtils::MakeMaker 6.64;

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

这篇关于如何在ExtUtils :: MakeMaker Makefile.PL中指定测试先决条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆