Tanktalus has asked for the wisdom of the Perl Monks concerning the following question:
I hate erroneous error messages. Like benign warnings. They only serve to hide true problems. Like doing a testcover on a module, seeing that you're only getting 63.2% conditional coverage, and then noticing that one of them is for code like this:
when $self->{default_foo} is very carefully never allowed to be bad (a default provided in new, and the setter function not allowing bad values, including no value). And then Devel::Cover posits:my $var = $opts->{foo} || $self->{default_foo};
| 863 | 67 |
| my $var = $opts->{foo} || $self->{default_foo}; |
Update: I guess I should read the TODO file:
Not entirely sure how said tool would work, but that's the basic idea. I kinda like my comment idea better - because I'm much less likely to lose checked-in code than the cover_db database, where I presume the "unreachable code" will be remembered.- Marking of unreachable code - commandline tool and gui.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Devel::Cover and impossible codepaths
by ikegami (Patriarch) on Nov 14, 2009 at 18:39 UTC | |
|
Re: Devel::Cover and impossible codepaths
by ikegami (Patriarch) on Nov 14, 2009 at 18:42 UTC | |
by Tanktalus (Canon) on Nov 16, 2009 at 15:02 UTC | |
by ikegami (Patriarch) on Nov 16, 2009 at 16:42 UTC |