cover
Perl tool for determining code coverage metrics
Install
- All systems
-
curl cmd.cat/cover.sh
- Debian
-
apt-get install libdevel-cover-perl
- Ubuntu
-
apt-get install libdevel-cover-perl
- Arch Linux
-
pacman -S libdevel-cover-perl
- Kali Linux
-
apt-get install libdevel-cover-perl
- CentOS
-
yum install libdevel-cover-perl
- Fedora
-
dnf install libdevel-cover-perl
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install libdevel-cover-perl
- Raspbian
-
apt-get install libdevel-cover-perl
- Dockerfile
- dockerfile.run/cover
libdevel-cover-perl
Perl tool for determining code coverage metrics
Devel::Cover is a Perl module that helps collect and display code coverage information. Code coverage information is collected using a pluggable runops function which counts how many times each op is executed. This data is then mapped back to reality using the B compiler modules. There is also a another statement profiler which needs a better backend to be really useful. Statement, branch, condition, subroutine, pod and time coverage information is reported. Statement coverage data should be reasonable, although there may be some statements which are not reported. Branch and condition coverage data should be mostly accurate too, although not always what one might initially expect. Subroutine coverage should be as accurate as statement coverage. Pod coverage comes from Pod::Coverage. If Pod::Coverage::CountParents is available it will be used instead. Coverage data for path coverage are not yet collected. The cover program can be used to generate coverage reports. Another included program, gcov2perl, can convert gcov files to Devel::Cover databases.