How To Install libdevel-hide-perl on Debian 9

In this tutorial we learn how to install libdevel-hide-perl on Debian 9. libdevel-hide-perl is module for forcing the unavailability of specified Perl modules (for testing)

Introduction

In this tutorial we learn how to install libdevel-hide-perl on Debian 9.

What is libdevel-hide-perl

libdevel-hide-perl is:

Given a list of Perl modules/filenames, Devel::Hide makes require and use statements fail (no matter the specified files/modules are installed or not).

They die with a message like:

Can’t locate Module/ToHide.pm (hidden)

The original intent of Devel::Hide is to allow Perl developers to test for alternative behavior when some modules are not available. In a Perl installation, where many modules are already installed, there is a chance to screw things up because you take for granted things that may not be there in other machines.

There are three methods to install libdevel-hide-perl on Debian 9. 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-hide-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-hide-perl using apt-get by running the following command:

sudo apt-get -y install libdevel-hide-perl

Install libdevel-hide-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libdevel-hide-perl using apt by running the following command:

sudo apt -y install libdevel-hide-perl

Install libdevel-hide-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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libdevel-hide-perl using aptitude by running the following command:

sudo aptitude -y install libdevel-hide-perl

How To Uninstall libdevel-hide-perl on Debian 9

To uninstall only the libdevel-hide-perl package we can use the following command:

sudo apt-get remove libdevel-hide-perl

Uninstall libdevel-hide-perl And Its Dependencies

To uninstall libdevel-hide-perl and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove libdevel-hide-perl

Remove libdevel-hide-perl Configurations and Data

To remove libdevel-hide-perl configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge libdevel-hide-perl

Remove libdevel-hide-perl configuration, data, and all of its dependencies

We can use the following command to remove libdevel-hide-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libdevel-hide-perl

Dependencies

libdevel-hide-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libdevel-hide-perl package on Debian 9 using different package management tools: apt, apt-get and aptitude.