Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: When 100% Code Coverage Backfires

by Ovid (Cardinal)
on Mar 26, 2007 at 14:44 UTC ( [id://606591]=note: print w/replies, xml ) Need Help??


in reply to Re^2: When 100% Code Coverage Backfires
in thread When 100% Code Coverage Backfires

++

I just removed some dead code earlier today that the code coverage spotted. It was along the lines of the following:

sub foo { # bunch of code if ( $some_condition ) { # do a bunch of stuff return $something; } else { # do some other stuff croak($error); } # do some more stuff }

That can be easy to miss in refactoring.

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re^4: When 100% Code Coverage Backfires
by adrianh (Chancellor) on Mar 26, 2007 at 15:33 UTC
    I just removed some dead code earlier today that the code coverage spotted.

    Ah the joys of legacy code :-)

    I've found code coverage to be a great exploratory tool. Want to know how your application does something - just write an end-to-end test and look at the test coverage. Much easier way of getting an overview than messing around the debugger.

    Informative too ("look - that critical bit of code doesn't touch the logging module. Ooops.")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found