develooper Front page | perl.qa | Postings from December 2016

Re: Devel::Cover force adding unseen files - feedback requested.

Thread Previous | Thread Next
From:
=?ISO-8859-15?Q?Tina_M=FCller?=
Date:
December 26, 2016 12:04
Subject:
Re: Devel::Cover force adding unseen files - feedback requested.
Message ID:
alpine.DEB.2.00.1612261256300.16456@perl-community.de
Hi Jason,

On Sun, 25 Dec 2016, Jason Pyeron wrote:

> Coverage works great as part on continuous integration, until a new file is added and the unit tests are blissfully ignorant of the new file's existence.

Maybe this is not what you're looking for, but it works well
for me loading any module in t/00.load.t:

     use Test::More;

     # unorthodox but works fine
     use Module::Pluggable search_path => ['Module::Namespace'];
     my @plugins = main->plugins;
     for my $module (@plugins) {
         use_ok( $module );
     }

     done_testing;

This way I never have to touch that test again and still every new module
will show up in coverage.

Using Dist::Zilla, you can also use the Test::Compile plugin.

Of course, this only works for .pm files.

cheers,
tina

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About