D::C is cool. I also agree xdg's observations. It can definitely seduce one into obsessing over achieving 100% coverage on all fronts, which, given the current limitations of D::C, is not always reasonable.
In addition to the ones already mentioned, one (admittedly pretty darn obscure) situation I haven't figured out how to cover is code like this:
In tests, the __DIE__ handler would always run within the dynamic scope of an eval, for obvious reasons, so $^S (aka, $EXCEPTIONS_BEING_CAUGHT) will always be true.$SIG{ __DIE__ } = sub { if ( $^S ) { # exceptions being caught } else { # uncoverable? die; } }
Update: I added a die statement to the second branch of the conditional. Thanks to davidrw, whose reply alerted me to the omission.
the lowliest monk
In reply to Re: TDD with Coverage Analysis. Wow.
by tlm
in thread TDD with Coverage Analysis. Wow.
by dws
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |