How To Install libsub-identify-perl on Ubuntu 18.04

In this tutorial we learn how to install libsub-identify-perl on Ubuntu 18.04. libsub-identify-perl is module to retrieve names of code references

Introduction

In this tutorial we learn how to install libsub-identify-perl on Ubuntu 18.04.

What is libsub-identify-perl

libsub-identify-perl is:

Sub::Identify allows you to retrieve the real name of code references. For this, it uses perl’s introspection mechanism, provided by the B module.

It provides four functions : sub_name returns the name of the subroutine (or ANON if it’s an anonymous code reference), stash_name returns its package, and sub_fullname returns the concatenation of the two.

The fourth function, get_code_info, returns a list of two elements, the package and the subroutine name (in case of you want both and are worried by the speed.)

In case of subroutine aliasing, those functions always return the original name.

There are three methods to install libsub-identify-perl on Ubuntu 18.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 libsub-identify-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 libsub-identify-perl using apt-get by running the following command:

sudo apt-get -y install libsub-identify-perl

Install libsub-identify-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsub-identify-perl

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

sudo aptitude -y install libsub-identify-perl

How To Uninstall libsub-identify-perl on Ubuntu 18.04

To uninstall only the libsub-identify-perl package we can use the following command:

sudo apt-get remove libsub-identify-perl

Uninstall libsub-identify-perl And Its Dependencies

To uninstall libsub-identify-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libsub-identify-perl

Remove libsub-identify-perl Configurations and Data

To remove libsub-identify-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libsub-identify-perl

Remove libsub-identify-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsub-identify-perl

References

Summary

In this tutorial we learn how to install libsub-identify-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.