How To Install perl-Variable-Magic on CentOS 7

In this tutorial we learn how to install perl-Variable-Magic on CentOS 7. perl-Variable-Magic is Associate user-defined magic to variables from Perl

Introduction

In this tutorial we learn how to install perl-Variable-Magic on CentOS 7.

What is perl-Variable-Magic

Magic is Perl way of enhancing objects. This mechanism let the user add extra data to any variable and hook syntactical operations (such as access, assignation or destruction) that can be applied to it. With this module, you can add your own magic to any variable without the pain of the C API.

We can use yum or dnf to install perl-Variable-Magic on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Variable-Magic.

Install perl-Variable-Magic on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-Variable-Magic using yum by running the following command:

sudo yum -y install perl-Variable-Magic

Install perl-Variable-Magic on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-Variable-Magic using dnf by running the following command:

sudo dnf -y install perl-Variable-Magic

How To Uninstall perl-Variable-Magic on CentOS 7

To uninstall only the perl-Variable-Magic package we can use the following command:

sudo dnf remove perl-Variable-Magic

References

Summary

In this tutorial we learn how to install perl-Variable-Magic on CentOS 7 using yum and dnf.