Yesterday I uploaded my new
module to CPAN. It has some specific test dependency: Test::Mock::LWP::Dispatch. Today I got 17 failed reports from CPAN Testers. All has "Can't locate Test/Mock/LWP/Dispatch.pm in @INC ...".
Example.
So, how to specify test dependencies properly? Now my Makefile.PL looks likes this:
WriteMakefile(
NAME => 'LWP::UserAgent::Cached',
LICENSE => 'perl',
VERSION_FROM => 'lib/LWP/UserAgent/Cached.pm', # finds $VERSI
+ON
PREREQ_PM => { 'LWP::UserAgent' => 0 }, # e.g., Module::Na
+me => 1.1
META_MERGE => {
resources => {repository => 'https://github.com/olegwtf/p5-LWP-Use
+rAgent-Cached'},
test_requires => {
'Test::More' => 0.88,
'Test::Mock::LWP::Dispatch' => 0.02,
'File::Temp' => 0
}
},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/LWP/UserAgent/Cached.pm', # retrieve abs
+tract from module
AUTHOR => 'Oleg G <oleg@cpan.org>') : ()),
);
But it seems that `test_requires' option doesn't work.