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.
  • Isn't Test::More one of those modules that every Perl installation should have? So the sooner someone is "forced" to install it the better, IMHO.

    As dependencies go, isn't Test::More pure Perl, so it should install everywhere without problem?
  • 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 cr
  • I think that the Test:: modules should not be part of the prerequisites for using a module. Am I right?

    If you can't run the tests, then how do you know that your users can actually use the module?

    --

    --
    xoa

    • Like he said, he doesn't do this for modules. That's a different world with different expectations.
    • In fact, the conclusion came to me after posting that entry:

      It would be nice to separate the test prerequisites and the usage prerequisites.

      I've just been told (hi Maddingue [perl.org]!) that Module::Build [cpan.org] allows this (well build_requires is not quite the same as a test_requires, but probably close enough).

  • In fact, I think what you want is something similar to the build_requires in Build.PL but for the tests only: tests_requires. Maybe you could ask Ken Williams to add this for the next release of Module::Build?
    --
    Close the world. txEn eht nepO
  • I think Test::Simple should be marked as a dependency. It really is needed to run the basic tests to confirm the module works. If you need other more esoteric Test::* modules then test scripts which degrade gracefully may be a good idea. Unfortunately, that would not allow you to take the fullest advantage of the the service provided by the wonderful CPAN-Testers team.

    On a related note, many CPAN modules are also repackaged in RPM, .deb and related formats. These files are easier for Joe Public to ins

    • Unfortunately, that would not allow you to take the fullest advantage of the the service provided by the wonderful CPAN-Testers team.

      Well, I take for granted the fact that all CPAN testers have at least all the Test::* modules installed.

      • I take for granted the fact that all CPAN testers have at least all the Test::* modules installed

        Yes, but surely that's largely as a result of those modules being listed as prerequisites in the distributions being tested.