How To Install perl-Readonly on CentOS 7
Introduction
In this tutorial we learn how to install perl-Readonly on CentOS 7.
What is perl-Readonly
Readonly provides a facility for creating non-modifiable scalars, arrays, and hashes. Any attempt to modify a Readonly variable throws an exception. Readonly * Creates scalars, arrays (not lists), and hashes * Creates variables that look and work like native perl variables * Creates global or lexical variables * Works at run-time or compile-time * Works with deep or shallow data structures * Prevents reassignment of Readonly variables
We can use yum or dnf to install perl-Readonly on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Readonly.
Install perl-Readonly 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-Readonly using yum by running the following command:
sudo yum -y install perl-Readonly
Install perl-Readonly 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-Readonly using dnf by running the following command:
sudo dnf -y install perl-Readonly
How To Uninstall perl-Readonly on CentOS 7
To uninstall only the perl-Readonly package we can use the following command:
sudo dnf remove perl-Readonly
References
Summary
In this tutorial we learn how to install perl-Readonly on CentOS 7 using yum and dnf.