dzil kwalitee

CPANTSkwaliteetoolchainDist::Zillaadoption Tue 1 July 2014

As I've previously written about, one of the things I do when I adopt a distribution is to get it 'CPANTS clean'. To make my life ever-so-slightly-easier, I've created a Dist::Zilla command that will generate the CPANTS Kwalitee score for your distribution: dzil kwalitee.

If you're not familiar with CPANTS and the Kwalitee score, here's the introduction from the CPANTS web site:

CPANTS is a testing service for CPAN distributions. One of its goals is to provide some sort of quality measure called Kwalitee. Though it looks and sounds like quality, higher Kwalitee score doesn't always mean a distribution is more useful for you. All it can assure is it's less likely for you to encounter problems on installation, the format of manuals, licensing, or maybe portability, as most of the CPANTS metrics are based on the past toolchain/QA issues you may or may not remember.

For me, being 'CPANTS clean' identifies a well-behaved or co-operating distribution. It is likely to work well with the standard toolchain, and also be amenable to processing by ad-hoc tools and analysis.

The Kwalitee rating for a distribution is generated using Module::CPANTS::Analyse. Its distribution includes a script cpants_lint.pl, which can be used from the command-line to check your dist's tarball:

% cpants_lint.pl Module-Path-0.13.tar.gz

For the first version of Dist::Zilla::App::Command::kwalitee, I was using system() to run cpants_lint.pl, but suggested to ISHIGAKI that the functionality could be refactored into a module. I offered to do it, but Ishigaki-san said "I'll do it!", and he did, creating App::CPANTS::Lint.

So now if you install Dist::Zilla::App::Command::kwalitee you can run:

% dzil kwalitee

I first called the command cpants, and considered lint, but in the end this felt like the right name.

You can enable the experimental Kwalitee metrics with the -e option:

% dzil -e
comments powered by Disqus