demerphq wrote:
On 9/21/05, David Landgren <[EMAIL PROTECTED]> wrote:

I know I had my eyes opened by Devel::Cover. I thought I had pretty good
coverage in Regexp::Assemble. In fact I had about 60%. I lifted it up to
100% statement coverage (some branching and conditional paths are never
taken, but they are "normal", for example C<$foo or return 0>). This
toook about 15 hours of work over a week or so. I caught a couple of
minor bugs and one rather big one in the process.


Well, I dont think it would be possible for me to get 100% coverage in
a module like Data::Dump::Streamer. Im pretty happy that I managed to
get about 80% actually.

The problem for me is that i have a fair amount of code that is
specifically for one version of perl, or another, or to handle "never
happen" cases (like Scalar::Util::reftype() returning a unknown type).
Likewise all kinds of things that are supported in 5.8 are totally
meaningless in 5.6.x (locked hashes anyone?).

You miss my point. Whether the code be cross-platform or cross-version, you need to aggregate the coverage results from all the environments your code is designed to run on.

"can't happen" is another kettle of fish, of course. I wouldn't advocate stripping out defensive coding in order to improve coverage.

But then again, in large system failures it's the never-visted code, executed in failure modes, that are regularly singled out as a source of failure amplification. Just read computer.risks for a while.

David

OTOH, i was happy that DC illustrated some "dead" codepaths that
probably could be removed. But im resigned to never getting 100%.

And, it doesnt help that something about DC breaks the defined
operator when dealing with overloaded objects. (yeah, he did say the
code was alpha quality :-)

cheers,
yves




--
"It's overkill of course, but you can never have too much overkill."

Reply via email to