the usual
inconsistent at best
Devel::Cover Notes

Some notes for using Devel::Cover.

Gathering coverage

CPAN::Reporter doesn’t have a build step, so we prove -l; we also don’t want to cover the world, so we set -inc=lib:

HARNESS_PERL_SWITCHES=-MDevel::Cover=-inc=lib prove -l

or:

PERL5OPT=-MDevel::Cover prove t/some-test.t

This will run the prove utility and turn on code coverage.

Selecting only one file to cover

cover -select=lib/Some/Module.pm

You may add multiple -select options.

Ignoring files to cover

cover -ignore_re=^/var/core_lib -ignore=/usr/bin/prove

Last modified on 2015-01-14