Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

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

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":



  • 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 taking refuge in the Monastery: (4)
As of 2024-04-25 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found