How To Install perl-Moose on CentOS 7

In this tutorial we learn how to install perl-Moose on CentOS 7. perl-Moose is Complete modern object system for Perl 5

Introduction

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

What is perl-Moose

Moose is an extension of the Perl 5 object system. The main goal of Moose is to make Perl 5 Object Oriented programming easier, more consistent and less tedious. With Moose you can to think more about what you want to do and less about the mechanics of OOP. Additionally, Moose is built on top of Class metaclass system for Perl 5. This means that Moose not only makes building normal Perl 5 objects better, but it provides the power of metaclass programming as well. Moose is different from other Perl 5 object systems because it is not a new system, but instead an extension of the existing one.

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

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

sudo yum -y install perl-Moose

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

sudo dnf -y install perl-Moose

How To Uninstall perl-Moose on CentOS 7

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

sudo dnf remove perl-Moose

References

Summary

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