Time spent waiting for tests you know will pass is time wasted

I've started using 'cpanm -n Module' to install Perl modules. The '-n' tells cpanminus to skip testing and just install the module.

"What, are you insane?"

Nope, I have just found that for most Perl modules, it is more time efficient to skip testing on the initial install, and sort out any problems later. Especially with a setup you know that works.

If I was installing a new application for the first time, I would probably not skip the tests however.

5 Comments

Yup, I always stick -n there. Back when I used cpan I always prefix the install command with 'notest'. I can't afford to waste seconds or minutes every time I install the same modules in several places. It adds up.

For installing the same set of stuff across lots of machines I've always found it far nicer to build a debian package out of each CPAN dist, and install those via apt. Tests are run at package build time, not install time. Plus this handles dependencies nicer as well.

In some ways this is analogous to not getting immunised. You can get away with not running tests if everyone else is running them. If too many people, and especially if too many people similar to you, decide not to run the tests then there could be trouble ahead.

One of the goals I had when starting the Module::Build project was a 'retest' action, to allow someone to run tests using the installed version of their modules, rather than the one in the build directory. It does pretty much work, but many distributions don't consider that scenario so they make assumptions that break the tests when run under 'retest'.

But if it worked in general, you could install the binaries & then schedule the tests to run later & inform you if they failed.

Leave a comment

About Phred

user-pic I blog about Perl and mod_perl.