This is in reponse to a private /msg and the UPDATE.
It's too bad there are no cpancover results yet because I could have tried to explain the detailed version of the coverage report.
So, let's focus on what you showed instead. What you have is the summary version of the report. This is the line that matters:
XML/Lenient.pm 100.0 67.7 88.8 100.0 n/a 39.4
+ 88.8
This is the code that you want to analyze. You are not interested analyzing the coverage of the xml/cover.t test code, and I will show a way to automatically ignore that later. This summary line shows that you have 100% coverage for statements (stmt) and subroutines (subs). That is what you hope to see. It means that all your subs have been called at least once in your tests and that all simple lines of code have been executed at least once.
The summary also states that you have less than 100% for branches (bran) and conditions (cond). This means that you have some code that your tests do not execute, and you need to analyze these results further. Unfortunately, I can't provide any details on how to do so without seeing a detailed report.
Depending on what command(s) you ran to generate that summary report, you may already have the detailed report sitting there in your directory. Look for an HTML file somewhere under the directory where you ran the command.
Lets assume you didn't generate a detailed report. Here is how I do it for one of my CPAN modules. I go to the parent directory of the "lib" directory, and I execute these commands:
env PERL5LIB=lib PERL5OPT=-MDevel::Cover prove
cover -report html -outputdir cover_report
Here is the output I see:
env PERL5LIB=lib PERL5OPT=-MDevel::Cover prove
t/cr_lf.t ....... ok
t/dumps.t ....... ok
t/list_sigs.t ... ok
t/parse_vcd.t ... ok
t/pod.t ......... skipped: Test::Pod 1.22 required for testing POD
t/use_stdout.t .. ok
All tests successful.
Files=6, Tests=78, 2 wallclock secs ( 0.06 usr 0.03 sys + 1.62 cusr
+ 0.24 csys = 1.95 CPU)
Result: PASS
cover -report html -outputdir cover_report
Reading database from .../vcd/src/cover_db
---------------------------- ------ ------ ------ ------ ------ ------
+ ------
File stmt bran cond sub pod time
+ total
---------------------------- ------ ------ ------ ------ ------ ------
+ ------
...cal/perl/5.14.2/bin/prove 100.0 50.0 n/a 100.0 n/a 19.1
+ 87.5
lib/Verilog/VCD.pm 100.0 100.0 100.0 100.0 81.8 4.4
+ 99.2
t/cr_lf.t 100.0 n/a n/a 100.0 n/a 12.1
+ 100.0
t/dumps.t 100.0 n/a n/a 100.0 n/a 13.3
+ 100.0
t/list_sigs.t 100.0 n/a n/a 100.0 n/a 12.3
+ 100.0
t/parse_vcd.t 100.0 n/a n/a 100.0 n/a 13.3
+ 100.0
t/pod.t 81.2 50.0 n/a 100.0 n/a 12.1
+ 81.8
t/use_stdout.t 98.5 50.0 n/a 100.0 n/a 13.3
+ 97.2
Total 99.2 95.0 100.0 100.0 81.8 100.0
+ 98.4
---------------------------- ------ ------ ------ ------ ------ ------
+ ------
Writing HTML output to .../vcd/src/cover_report/coverage.html ...
done.
The last line shows where the HTML detailed report is. I bring the report into a browser with:
firefox cover_report/coverage.html
You should try to reproduce this for your code. You should not have to create a new file for all of your tests.
As I mentioned earlier, the way to exclude coverage results for the test code itself is with a line like this:
env PERL5LIB=lib PERL5OPT=-MDevel::Cover=-ignore,'t/.*',-ignore,prove
+prove
|