I've run my suite of unit tests with Devel::Cover turned on. I've created a coverage report. There are over a hundred modules in the report. The totals row lists the following:

Total 12.5 2.6 2.2 32.7 2.1 100.0 10.5

Now, I want to see what the coverage is for the 3 modules named Foo.pm (in MVC architecture). I run:

cover -select_re Foo\.pm

The coverage report looks like this:

file stmt bran cond sub pod time total lib/C/Foo.pm 19.1 0.0 0.0 50.0 0.0 0.0 13.3 lib/M/Foo.pm 6.4 0.0 0.0 11.5 0.0 0.0 5.2 lib/V/Foo.pm 31.6 n/a n/a 50.0 0.0 0.0 32.0 Total 12.5 2.6 2.2 32.7 2.1 100.0 10.5

The total row is the total for the entire codebase. I would like the total row to be the percentage of code lines covered in the 3 modules selected with the regex.

Any ideas on how to accomplish this? Can I provide any more information?

I am using Devel::Cover 0.73


In reply to How to get meaningful totals in a Devel::Cover coverage report for a subset of code? by Scags9876

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.