How To Install perl-MooseX-ConfigFromFile on AlmaLinux 8

In this tutorial we learn how to install perl-MooseX-ConfigFromFile in AlmaLinux 8. perl-MooseX-ConfigFromFile is An abstract Moose role for setting attributes from a configfile

Introduction

In this tutorial we learn how to install perl-MooseX-ConfigFromFile on AlmaLinux 8.

What is perl-MooseX-ConfigFromFile

This is an abstract role which provides an alternate constructor for creating objects using parameters passed in from a configuration file. The actual implementation of reading the configuration file is left to concrete subroles. It declares an attribute ‘configfile’ and a class method ’new_with_config’, and requires that concrete roles derived from it implement the class method ‘get_config_from_file’. Attributes specified directly as arguments to ’new_with_config’ supersede those in the configfile.

We can use yum or dnf to install perl-MooseX-ConfigFromFile on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install perl-MooseX-ConfigFromFile.

Install perl-MooseX-ConfigFromFile on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install perl-MooseX-ConfigFromFile

Install perl-MooseX-ConfigFromFile on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install perl-MooseX-ConfigFromFile

How To Uninstall perl-MooseX-ConfigFromFile on AlmaLinux 8

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

sudo dnf remove perl-MooseX-ConfigFromFile

References

Summary

In this tutorial we learn how to install perl-MooseX-ConfigFromFile on AlmaLinux 8 using yum and dnf.