On Mon, Jul 11, 2005 at 02:54:19PM -0700, Michael G Schwern wrote:

> On Mon, Jul 11, 2005 at 11:22:51PM +0200, Paul Johnson wrote:
> > >   my $foo = $bar || default();  # DC ignore X|0
> > > 
> > > "Hey, Devel::Cover!  Ignore the case where the right side of this logic is
> > > false."
> > 
> > I wasn't particularly happy with the idea of needing to change the
> > source code just to satisfy some tool.  I feel the same way about doing
> > things to shut up lint, for example, or to satisfy some arbitrary
> > metric.  That's why I've initially stored information in a .uncoverable
> > file.
> 
> Guh!  .uncoverable would presumably be line number based.  That means
> every time you edit your source file you have to change all the lines in
> .uncoverable.  *shudder*

Now, would I do that?!  It's actually based on the MD5 hash of the line
which means you only need to change it when you have changed the line,
which you would presumably (there's that word again) be doing anyway.

It seemed to work quite well for me in the last project I did, where I
tried to do test first development, keeping the coverage at 100%.  But
never fear, I'm comitted to supporting comments too.  Who knows, I might
even end up using them myself.

> The only other scheme I can think of, pattern matching based on source
> code, is unreliable.

Right.

> Finally, as with tests and docs, the closer you put the meta-data to
> the real data the more likely it will be kept up to date.  So inline
> Devel::Cover hints seem the way to go.

Hmmm ;-)

> 
> > Why is it that my TODO list only gets longer?
> 
> It means your code is popular and people want to use it and everybody loves 
> you!!!  Don't call them TODO items, call them "hug lines". ;)

$ svk mv TODO HUGS

Do I now get to port the thing to Haskell?

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to