Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I assume you mean Devel::Cover. If you haven't already, that documentation is really good, and covers some of your questions.

If you're getting unwanted files in your output, you can use -ignore or +ignore with a regexp. But you normally shouldn't be seeing those included modules. What does your directory structure look like, and how exactly are you invoking cover?

I use Devel::Cover in my distributions. In that case, I simply run cover -test in the root of my distribution, which runs make test and reports the coverage, and won't report coverage of other external modules. Here's what the output looks like for me:

pts/6 ryan@pi:~/src/Text-Trim $> cover -test Deleting database /home/ryan/src/Text-Trim/cover_db cover: running make test "OPTIMIZE=-O0 -fprofile-arcs -ftest-coverage" + "OTHERLDFLAGS=-fprofile-arcs -ftest-coverage" PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/00..load.t ..... 1/? # Testing Text::Trim 1.03, Perl 5.026001, /usr/ +bin/perl t/00..load.t ..... ok t/01..trim.t ..... ok t/02..ltrim.t .... ok t/03..rtrim.t .... ok t/04..unicode.t .. ok t/05..undef.t .... ok t/99..pod.t ...... ok All tests successful. Files=7, Tests=64, 2 wallclock secs ( 0.02 usr 0.00 sys + 1.91 cusr + 0.09 csys = 2.02 CPU) Result: PASS Reading database from /home/ryan/src/Text-Trim/cover_db --------------------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total --------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/Text/Trim.pm 100.0 100.0 100.0 100.0 100.0 100.0 100.0 Total 100.0 100.0 100.0 100.0 100.0 100.0 100.0 --------------------- ------ ------ ------ ------ ------ ------ ------ HTML output written to /home/ryan/src/Text-Trim/cover_db/coverage.html done.

I am not exactly sure what you mean by "merging", but if you can get all of your source code into the same distribution, you can have one report cover the whole thing. If that is not desirable or feasible, then I'm not sure what to suggest, aside from a simple concatenation or pagination of the results.

use strict; use warnings; omitted for brevity.

In reply to Re: Coverage report by rjt
in thread Coverage report by ovedpo15

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-23 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found