Subject: | gcov2perl fails on error "Undefined subroutine add_statement called" |
gcov2perl fails everytime it is run with the above error. The fix is actually very simple. diff -u like patch is provided below to fix the AUTOLOAD method in Devel::Cover::DB::Structure.pm.
my ($function, $criterion) = $func =~ /^(add|get)_(.*)/;
croak "Undefined subroutine $func called"
unless $criterion &&
--- grep $_ eq $criterion, $self->criteria, qw( time sub_name file line );
+++ grep $_ eq $criterion, $self->criteria, qw( time sub_name file line statement );
no strict "refs";
if ($function eq "get")