Steven Haryanto's Perl First World Problems #1 reminded me of something I've taken for granted lately.
You may have read my Controlling
Test Parallelism with prove and Parallelism
and Test Suites. I still have
enabled by default on most of the machines where I install my own Perls. While
I haven't yet filed tickets and tried to write patches for modules which need a
little help to run tests in parallel, I've only found a few lately that need
work. That's nice—having a module install through
five seconds is a lot better than ten seconds or more. (I like
cpanm because it's fast and quiet, and part of its speed
comes from not printing to the console.)
I like instant feedback.
Like Steven, I noticed quite a while that installing a custom Perl through perlbrew takes a while, but then I remembered that a lot of work went into the Perl 5 test suite to make tests run in parallel. (We did something similar with Parrot several years ago, and it changed the way I work forever.)
To run core tests in parallel, set the environment variable
TEST_JOBS=n, where n depends on your computer. I
use a value of 9 on a quad-core machine; in practice, that tends to keep the
CPU busy while not blocking anything too long on IO. You can set it globally in
your shell's configuration file or create an alias or wrapper for
As most of the time spent compiling and installing Perl 5 through perlbrew goes to running the test suite, this has saved me a measurable amount of time.