Subject: | Devel::Cover 0.66 does not work with Moose+type constraints |
I wish I could boil this down further, but so far I've been unable to. I'll keep trying.
Basically, when testing a Moose role with attributes that require
Moose::Utils::TypeConstraints, Devel::Cover blows up:
$ perl -MDevel::Cover -I./lib t/00-load.t
Devel::Cover: Can't find file "generated method (unknown origin)" (generated method
(unknown origin)): ignored.
Devel::Cover 0.66: Collecting coverage data for branch, condition, pod, statement, subroutine
and time.
Selecting packages matching:
Ignoring packages matching:
/Devel/Cover[./]
^t/
\.t$
^test\.pl$
Ignoring packages in:
.
/opt/perl/perls/perl-5.12.0/lib/5.12.0
/opt/perl/perls/perl-5.12.0/lib/5.12.0/darwin-2level
/opt/perl/perls/perl-5.12.0/lib/site_perl/5.12.0
/opt/perl/perls/perl-5.12.0/lib/site_perl/5.12.0/darwin-2level
Devel::Cover: Can't find file "(reeval 239)[/opt/perl/perls/perl-
5.12.0/lib/site_perl/5.12.0/darwin-2level/Moose/Util/TypeConstraints.pm:599]" ((reeval
239)[/opt/perl/perls/perl-5.12.0/lib/site_perl/5.12.0/darwin-
2level/Moose/Util/TypeConstraints.pm:599]): ignored.
Devel::Cover: Can't find file "(reeval 96)[/opt/perl/perls/perl-
5.12.0/lib/site_perl/5.12.0/darwin-2level/Moose/Util/TypeConstraints.pm:589]" ((reeval
96)[/opt/perl/perls/perl-5.12.0/lib/site_perl/5.12.0/darwin-
2level/Moose/Util/TypeConstraints.pm:589]): ignored.
Devel::Cover: Can't find file "(reeval 240)[/opt/perl/perls/perl-
5.12.0/lib/site_perl/5.12.0/darwin-2level/Moose/Util/TypeConstraints.pm:593]" ((reeval
240)[/opt/perl/perls/perl-5.12.0/lib/site_perl/5.12.0/darwin-
2level/Moose/Util/TypeConstraints.pm:593]): ignored.
Segmentation fault
(This particular test case is from my MooseX::Role::Pluggable dist.)
In this particular case, adding '-replace_ops,off' does NOT fix the problem.
In other cases that I've seen but haven't been able to reproduce in a simple or sharable form,
adding '-replace_ops,off' DOES fix the problem. (Specifically, in a Catalyst app that's using
Catalyst::Model::DBIC::Schema to wrap an existing Schema.)
As I said, I'll continue to try to reduce this to something simpler as I have time, but I wanted
to get the report into RT before something else popped up demanding my attention...