On Wed, Mar 14, 2012 at 08:49:37PM -0400, James E Keenan wrote:
> On a machine where I can only install libraries underneath my home
> directory, I today tried to install and use Devel::Cover.  After
> considerable effort, I was able to install Devel-Cover-0.79.

What problems did you have, and could anything in Devel::Cover have made
that easier?  I try to keep as many of the dependencies as possible
optional such that you only need to install them if you want the
functionality which uses them.  I'd like to ensure that Devel::Cover is
as easy to use as possible.

>                                                               But
> when I went to use it in conjunction with 'prove' I got error output
> like this:
> 
> #####
> $> HARNESS_PERL_SWITCHES=-MDevel::Cover prove t/001_new.t
> t/001_new..........................Devel::Cover: Can't open
> blib/lib/Class/MethodMaker/Engine.pm for MD5 digest: No such file or
> directory
> Devel::Cover: Can't open blib/lib/Class/MethodMaker/scalar.pm for
> MD5 digest: No such file or directory
> Devel::Cover: Can't open blib/lib/Class/MethodMaker/array.pm for MD5
> digest: No such file or directory
> Devel::Cover: Can't open blib/lib/Class/MethodMaker/hash.pm for MD5
> digest: No such file or directory
> #####

These are actually just warnings.  You're not the only person to whom
this wasn't clear.  In fact, it may be that I am the only person who
understood that they were warnings and so I have just changed the
message to include the word "warning".  This means that the only problem
you should see because of these warnings is that you don't see coverage
for the code in those files.  It sounds like you probably don't care
much about that.

> Class::MethodMaker is probably not installed on this machine, and
> it's certainly neither installed underneath my home directory nor
> used in the testing code or the code being tested.  But what's
> really puzzling to me is the fact that I cannot locate the string
> 'MethodMaker' anywhere in the Devel::Cover source code!
> 
> #####
> [Devel-Cover-0.79] 542 $ find . -type f | xargs grep -in MethodMaker
> [Devel-Cover-0.79] 543 $
> #####

Yes, you're quite correct.  Devel::Cover doesn't use this module at all.

> Can anyone suggest why I am getting this error message?

This is usually a result of someone telling fibs to perl in the form of
#line directives which don't match reality.  In this case I notice that
Class::MethodMaker uses AutoLoader which relies on AutoSplit and
AutoSplit does use such #line directives.  I think I may be able to see
a way to get Devel::Cover to do the right thing in this case, and I'll
look into that at the QA hackathon if I don't get to it beforehand.

But, in your case, it seems clear to me that something, somewhere, is
using Class::MethodMaker, but it's not Devel::Cover.  This is causing
the warnings you see, but you should just ignore the warnings.

Also, I should fix up Devel::Cover firstly so that it knows about
AutoSplit's tricks, and secondly so that it doesn't spit out warnings
about problems you don't care about (such as installed modules).

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

Reply via email to