I recently uploaded development releases of two distributions to CPAN where one depended on the other. Let's say one distro is named Distro
, the other Prereq
, and Distro
requires Prereq
version 0.009_001.
Unfortunately, I didn't get any test reports for Distro
. I think the reason is that the versions of dev releases simply aren't tracked by CPAN. They don't appear in 02packages.details.txt
, so CPAN thinks that the dependency can't be satisfied.
Is it impossible to make a CPAN Tester load a development release of a prerequisite? Or is there a work-around?
答案 0 :(得分:0)
尽管某些CPAN测试人员在测试您的发行版时可能恰好已经安装了该开发版本,但很可能没有,并且没有办法要求他们拥有它。
如果先决条件是Pure Perl,则可能可以将先决条件库的整个副本捆绑在发行版的./t/bundled/
目录中,然后在测试脚本中在顶部附近添加该选项,以强制捆绑版本由自动测试人员加载:
use FindBin '$Bin';
use if $ENV{AUTOMATED_TESTING}, lib => "$Bin/bundled";
use Name::Of::Prerequisite;
(我不是使用CPAN Testers做类似的事情,而是通过Travis持续集成,迫使它针对某些前提条件从GitHub进行的最新签出进行测试。)