Devel::Cover with Moose?

Toby Wintermute tjc at
Tue May 24 06:15:15 BST 2011

On 24 May 2011 04:26, Paul Johnson <paul at> wrote:
> On Mon, May 23, 2011 at 06:27:22PM +1000, Toby Corkindale wrote:
>> Is anyone else using Devel::Cover with Moose, much?
>> I seem to get megabytes of warnings displayed even on trivial modules.
>> It's trying to create MD5 digests of files containing the materialised
>> functions created by __PACKAGE__->meta->make_immutable.
>> For example:
>> $ cat
>> package Foo;
>> use Moose;
>> __PACKAGE__->meta->make_immutable;
>> 1;
>> $ perl -MDevel::Cover -e 'use Foo'
>> I've filed a bug report, but I don't suppose there's just an easy workaround?
> I've read the bug report.  I don't suppose there is, unless you count
> piping the output through grep -v "Can't" as an easy workaround.  It's
> quite easy, at least.
> Is the problem just that there is a lot of noise, or are the results
> incorrect in some way too?

It's mainly the noise that bothers me.

> The noise I can probably deal with.  The problem is, I suppose, that
> Moose is making up filenames and then when Devel::Cover takes it at its
> word and goes to look in those files it finds that Moose was actually
> telling porky pies, and so it complains about that.

I suppose that's fair enough, albeit annoying.

> Does Moose consistently format its made up filenames in some way that I
> could recognise them?  Is there any useful information in the made up
> filenames or should I just ignore them completely?

They appear to be package+function names, rather than file names - eg:

> I realise that this is not the appropriate list for this discussion, but
> I'm not on any Moose lists and you didn't ask in perl-qa :-P

I'm not on those lists either.. Sounds like I should probably join one
of these days.

Turning and turning in the widening gyre
The falcon cannot hear the falconer
Things fall apart; the center cannot hold
Mere anarchy is loosed upon the world

More information about the mailing list