Post by James E KeenanPost by Paul JohnsonHow did you generate
Post by Paul Johnsonyour coverage report?
cd $SOURCEDIR && \
cover -delete $COVERAGEDIR && \
PERL5OPT=-MDevel::Cover=-db,$COVERAGEDIR/ \
perl Makefile.PL && make && make test && \
I think the root of the problem lies here. If I'm not mistaken, I think
that $PERL5OPT will only have this value for the call of "perl
Makefile.PL" and not for make and make test.
And if PERL5OPT was set here you would get am error message that "cover"
shouldn't be run with coverage turned on.
Post by James E KeenanPost by Paul Johnson-coverage statement \
-coverage branch \
-coverage condition \
-coverage subroutine \
-ignore_re '^t\/' \
-ignore_re '^\/usr\/local\/bin' \
-ignore_re '^\/tmp' \
chmod 0755 $COVERAGEDIR/
Might I suggest something like this?
cd $SOURCEDIR && \
cover -delete $COVERAGEDIR && \
perl Makefile.PL && \
HARNESS_PERL_SWITCHES=-MDevel::Cover=-db,$COVERAGEDIR,-coverage,statement,branch,condition,subroutine make test && \
cover $COVERAGEDIR
Or, perhaps better still,
cd $SOURCEDIR && \
perl Makefile.PL && \
DEVEL_COVER_OPTIONS=-db,$COVERAGEDIR,-coverage,statement,branch,condition,subroutine cover -test $COVERAGEDIR
Post by James E KeenanData point: When I call this command, the first thing I get is a couple
Devel::Cover: Warning: can't open ro-accessor for object_id
(.../test-more/blib/lib/TB2/Mouse.pm) for MD5 digest: No such file or
directory
... even though blib/lib/TB2/Mouse.pm clearly exists.
Mouse.pm exists, but
"ro-accessor for object_id (.../test-more/blib/lib/TB2/Mouse.pm)" doesn't.
That's the made-up filename that that Mouse has pretended was the
location of that code. Recent versions of Devel::Cover should suppress
that warning.
Post by James E Keenancover $COVERAGEDIR -summary
... I fail to get reporting on the three packages mentioned earlier,
though all tests pass. This suggests that for some reason data is
not being recorded in the Devel::Cover DB.
Hopefully I've explained why above. What's confusing me is why you're
getting as much coverage as you are.
--
Paul Johnson - ***@pjcj.net
http://www.pjcj.net