I'm trying to capture coverage data for a large project I'm working on. I'm
running all of my unit tests through Test::Harness and I'm trying to utilize
Devel::Cover within the harness. Honestly this is mostly a nitpicky thing
because I can get Devel::Cover to work, but I'm seeing warnings and I want
to make sure I'm not loosing anything because of them.

My harness looks roughly like this:

----

use Test::Harness;
$Test::Harness::switches = '-MDevel::Cover';

my @tests_to_run = qw(
    test1.t
    test2.t
    test3.t
    ...
);

runtests(@tests_to_run);

----

...about as simple as it gets. When I run this way I get warnings like this:

Devel::Cover: Can't find file "blib/lib/Net/SSLeay.pm": ignored.
Devel::Cover: Can't find file "blib/lib/Storable.pm": ignored.
Devel::Cover: Can't find file "../../lib/POSIX.pm": ignored.

Interestingly enough if I change the $Test::Harness::switches assignment to
this:

$ENV{HARNESS_PERL_SWITCHES} = '-MDevel::Cover';

I no longer see the warnings. This seems like a kludge, but I also don't
want to deal with the warnings. Any thoughts as to what's going on?

Note that I do use Storable and POSIX in places, but I don't use
Net::SSLeay, at least not directly.

Andrew

----

Andrew Gianni
Administrative Computing Services
Computing and Information Technology
University at Buffalo
215 MFAC, Ellicott Complex
Buffalo, NY 14261-0026
716.645.3587x7124

Reply via email to