Devel::Cover - only subroutine coverage

354 Views Asked by At

I want only subroutine coverage in my perl file. So in main file I inserted the following statement:

mainfile.pl

use Devel::Cover::Subroutine;

If I run mainfile.pl it shows the error:

Devel::Cover: Writing coverage database to /home/devel1/Devel-Cover-0.78/examples1/cover_db/runs/1319109459.10082.56199
Can't find digest for mainfile.pl at /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/Devel/Cover/DB/Structure.pm line 282.
Devel::Cover: Can't find digest for mainfile.pl
--------------------------------------------------------------- ------ ------
File                                                               sub  total
--------------------------------------------------------------- ------ ------
Total                                                              n/a    n/a
--------------------------------------------------------------- ------ ------

How can I resolve this error? But when I use only use Devel::Cover; it works properly.

1

There are 1 best solutions below

0
On

Devel::Cover::Subroutine is an internal module used by Devel::Cover to represent subroutine coverage data. You should not use this directly. Instead, you should use Devel::Cover with the -subs_only option.