On Sun, Jan 30, 2005 at 08:09:58PM -0500, Jim Keenan wrote:

> Leif Eriksen wrote:
> >I'd guess it is because you are seeing the output of the code after it 
> >has been compiled-then-decompiled - it is compiled so it can run and 
> >coverage statistics can be collected, then it is decompiled to relate 
> >coverage stats to code lines. Now there are many ways to write code that 
> >compiles to the same compiled form, but the decompiler (I imagine it is 
> >B::Deparse) only decompiles those symbols one way.
> 
> Apparently so.  I got similar results incorporating my other sample of 
> the problem ( '!' printing out as 'not' in the branch.html file) into 
> your 2 little scripts.  Thank you very much.

Yes, this is correct.  The output in the main display comes from reading
the text of the covered program and displaying the relevant line in its
entirety.  The output for the branch coverage display comes from the
output of B::Deparse.  The reason for this is that I wanted to display
only the relevant part of the source to make the actual branch clearer.
The same is true for the condition coverage report.  Unfortunately, this
also has the effect you have noticed.  B::Deparse has options to control
how the output is displayed, but I wasn't able to find anything that
improved on the current output in the general case.

I suppose that's the price you pay for TIMTOWTDI.

[ Is that a Python programmer I hear giggling in the background? ]

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

Reply via email to