I tend to use a Makefile* for running coverage reports. Here's a relevant snippet:

OPENCMD = open BROWSER = /Applications/Safari.app clean: cover -delete test: prove cover.pl cover: make clean PERL5OPT=-MDevel::Cover=+ignore,.*\.t,-ignore,prove make test 2>&1 cover make report report: $(OPENCMD) $(BROWSER) cover_db/coverage.html

Customized a bit for a Mac, but the relevant parts are the PERL5OPTS ENV I'm setting, which points out how to ignore things using -ignore and +ignore - as long as you know the syntax it's expecting, the docs should clear things up. In a nutshell, I'm telling Devel::Cover to ignore my .t files, as well as the prove utility. Fascinating yes, but like you, that's not what I really care about :)

You don't necessarily need a Makefile for this, simply typing the following into an appropriate command line** will work***, too:

$ PERL5OPT=-MDevel::Cover=+ignore,.*\.t,-ignore,prove prove

Update: changed the PERL5OPT line a bit, added a little more explanation.

* I'm not great with Makefiles, but the above works for me.

** i.e. some unixish shell, other OSes may not let you specify environment variables like that.

*** assuming your test files are in `cwd` and named *.t.



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

In reply to Re: Setting Devel::Cover options for a web application by chargrill
in thread Setting Devel::Cover options for a web application by talexb

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.