How To Install libvariable-magic-perl on Ubuntu 18.04

In this tutorial we learn how to install libvariable-magic-perl on Ubuntu 18.04. libvariable-magic-perl is module to associate user-defined magic to variables from Perl

Introduction

In this tutorial we learn how to install libvariable-magic-perl on Ubuntu 18.04.

What is libvariable-magic-perl

libvariable-magic-perl is:

Variable::Magic is Perl way of enhancing objects. This mechanism lets the user add extra data to any variable and hook syntaxical operations (such as access, assignment or destruction) that can be applied to it.

With this module, you can add your own magic to any variable without having to write a single line of XS.

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

sudo apt-get -y install libvariable-magic-perl

Install libvariable-magic-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libvariable-magic-perl

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

sudo aptitude -y install libvariable-magic-perl

How To Uninstall libvariable-magic-perl on Ubuntu 18.04

To uninstall only the libvariable-magic-perl package we can use the following command:

sudo apt-get remove libvariable-magic-perl

Uninstall libvariable-magic-perl And Its Dependencies

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

sudo apt-get -y autoremove libvariable-magic-perl

Remove libvariable-magic-perl Configurations and Data

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

sudo apt-get -y purge libvariable-magic-perl

Remove libvariable-magic-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libvariable-magic-perl

References

Summary

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