Subject: | test_coverage_ok fails on classes without static subs |
ok_test_coverage() fails for modules that have no static sub
declarations. This can easily happen when using code generators like
DBIx::Class and friends.
This can easily fixed if the package hash is predeclared when
registering the module for coverage tests as shown below.
---
sub test_coverage{
my ($package) = @_;
return unless defined $package;
$last = $package;
_get_subroutines($package);
+ # don't fail on subs without static subs
+ $invokes->{$package} = {};
for my $subref(@{$self->{subs}->{$package}}){
[...]