Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • while I'm a guity as anyone for having done this in the past, I've not come to support the position that test modules should not be prerequisites a la PREREQ_PM despite the ubiquity of Test::More - there is a large difference between the test environment and the code itself, and making it impossible to build and install a module when test environment dependencies are missing just seems wrong.

    but another solution to using a BEGIN block in each test file is to override the test target in the Makefile by creating your own MY::test subroutine in Makefile.PL. something similar to this [cpan.org] (but for Test::More, of course). while it doesn't protect against people running the test files by themselves, it give an appropriate response for people just following perl Makefile.PL && make && make test...