Introduction
In this tutorial we learn how to install libdevel-cover-perl
on Ubuntu 20.04.
What is libdevel-cover-perl
libdevel-cover-perl is:
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.
There are three methods to install libdevel-cover-perl
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libdevel-cover-perl Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libdevel-cover-perl
using apt-get
by running the following command:
sudo apt-get -y install libdevel-cover-perl
Install libdevel-cover-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libdevel-cover-perl
using apt
by running the following command:
sudo apt -y install libdevel-cover-perl
Install libdevel-cover-perl Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libdevel-cover-perl
using aptitude
by running the following command:
sudo aptitude -y install libdevel-cover-perl
How To Uninstall libdevel-cover-perl on Ubuntu 20.04
To uninstall only the libdevel-cover-perl
package we can use the following command:
sudo apt-get remove libdevel-cover-perl
Uninstall libdevel-cover-perl And Its Dependencies
To uninstall libdevel-cover-perl
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libdevel-cover-perl
Remove libdevel-cover-perl Configurations and Data
To remove libdevel-cover-perl
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libdevel-cover-perl
Remove libdevel-cover-perl configuration, data, and all of its dependencies
We can use the following command to remove libdevel-cover-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libdevel-cover-perl
References
Summary
In this tutorial we learn how to install libdevel-cover-perl
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.