How To Install libmodule-want-perl on Debian 9

In this tutorial we learn how to install libmodule-want-perl on Debian 9. libmodule-want-perl is module to check @INC only once for wanted modules

Introduction

In this tutorial we learn how to install libmodule-want-perl on Debian 9.

What is libmodule-want-perl

libmodule-want-perl is:

Sometimes you want to lazy load a module for use in, say, a loop or function. First you do the eval-require but then realize if the module is not available it will re-search @INC each time. So then you add a lexical boolean to your eval and do the same simple logic all over the place.

Module::Want encapsulates that logic so that have_mod() is like eval { require X; 1 } but if the module can’t be loaded it will remember that fact and not look in @INC again on subsequent calls.

There are three methods to install libmodule-want-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 libmodule-want-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 libmodule-want-perl using apt-get by running the following command:

sudo apt-get -y install libmodule-want-perl

Install libmodule-want-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libmodule-want-perl

Install libmodule-want-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 libmodule-want-perl using aptitude by running the following command:

sudo aptitude -y install libmodule-want-perl

How To Uninstall libmodule-want-perl on Debian 9

To uninstall only the libmodule-want-perl package we can use the following command:

sudo apt-get remove libmodule-want-perl

Uninstall libmodule-want-perl And Its Dependencies

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

sudo apt-get -y autoremove libmodule-want-perl

Remove libmodule-want-perl Configurations and Data

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

sudo apt-get -y purge libmodule-want-perl

Remove libmodule-want-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libmodule-want-perl

Dependencies

libmodule-want-perl have the following dependencies:

References

Summary

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