Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Devel::Cover for Dummies

by pemungkah (Priest)
on May 04, 2010 at 23:05 UTC ( [id://838405]=note: print w/replies, xml ) Need Help??


in reply to Devel::Cover for Dummies

Devel::Cover leverages Perl's debugger hooks. Instead of stopping execution and giving you control (like the debugger), or counting the number of times you reached a statement (like Devel::NYTProf), Devel::Cover records all the places execution reached. Your test code gives you a particular place to put the code you'll be running to reach as much of your code as possible, but the fact that it runs tests is actually a side issue: what matters is how much of the program gets visited (your "coverage").

Any code you run with -MDevel::Cover is automatically added to the coverage database. This means that sometimes you have to get creative to have Devel::Cover only record coverage for your code, instead of also recording coverage for prove, all of the Test:: modules you use, and so on.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://838405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-16 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found