Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I'm not bothered in the least by having a 'redundant' path in my code of the form:

if(1) { $obj->method(); } else { print STDERR "False is true, War is peace and slavery is freedom. W +e should never have reached this condition.\n"; die; }
Somewhere among all those Best Practices articles I've read, I picked up the habit of never writing a conditional without an else clause. I can elsif my way through lots of potential logical branches, but if I fail to code some exception throwing into a final else branch of the dispatch code, I will never know if I truly covered all the bases.

I tried this '100%' exercise with a module last year, and got coverage of over 90%, most of the uncovered execution paths were along the lines of the example above.

-- Hugh

if( $lal && $lol ) { $life++; }

In reply to Re: Lessons learned from getting to 100% with Devel::Cover by hesco
in thread Lessons learned from getting to 100% with Devel::Cover by leriksen

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 avoiding work at the Monastery: (6)
As of 2024-03-29 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found