How To Install perl-MooseX-ConfigFromFile on CentOS 7
Introduction
In this tutorial we learn how to install perl-MooseX-ConfigFromFile on CentOS 7.
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’ supercede those in the configfile.
We can use yum or dnf to install perl-MooseX-ConfigFromFile on CentOS 7. 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 CentOS 7 Using yum
Update yum database with yum using the following command.
sudo yum makecache
After updating yum database, We can install perl-MooseX-ConfigFromFile using yum by running the following command:
sudo yum -y install perl-MooseX-ConfigFromFile
Install perl-MooseX-ConfigFromFile 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-MooseX-ConfigFromFile using dnf by running the following command:
sudo dnf -y install perl-MooseX-ConfigFromFile
How To Uninstall perl-MooseX-ConfigFromFile on CentOS 7
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 CentOS 7 using yum and dnf.