On Mon, Jun 28, 2004 at 01:55:09PM -0400, Geoffrey Young wrote:

> >   2.  Devel::Cover needs to be able to find Parser.yp.  In the example
> >       the filename given is Parser.yp, but the file is actually at
> >       lib/My/Parser.yp and so Devel::Cover can't find it.  Changing the
> >       example to give the full filename, 
> 
> you mean changing the #line directive?

Yes, sorry, that's exactly what I mean.

> >       or putting in a link from the
> >       current directory fixes the problem.  I'm not sure if this is
> >       actually a problem with Parse::Yapp or just a result of the way
> >       you packaged up the testcase.
> 
> well, the packaging is pretty much the way the code I'm testing is layed out
> - Foo.yp in the same directory as Foo.pm, and all under some lib/ someplace.
>  fairly standard I'd think.

Hmm.  If the name was My/Parser.yp you could argue that Devel::Cover
should search @INC to find it, but as it stands I don't see a sensible
and general way to locate the file with the information provided.

> but the symlink works - linking Foo.yp to the top-level directory, along
> side cover_db.
> 
> > 
> >   3.  Parse::Yapp doesn't clean up after itself by setting the line
> >       number and filename back to what it actually is, which means that
> >       subsequent code coverage is reported on in the grammar file even
> >       though it didn't come from there, which can be somewhat
> >       surprising.
> 
> hmph.
> 
> > 
> > So I'm afraid there's not much I can do about this one - it will need to
> > be fed to the author of Parse::Yapp and he can decide if he wants to do
> > anything about it.
> 
> I suppose I could do that, but it seems kinda strange to ask him to change
> stuff around just so we can have good test metrics.  but, per your
> suggestion, at least there is a simple workaround - thanks for that.

Yes, though you could argue that any warnings or errors coming from that
code will be confusing anyway.

> > In any case, the first fix will be in the next release, 
> 
> excellent, thanks.

Which is now out.

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

Reply via email to