How To Install perl-Readonly.noarch on Amazon Linux 2

In this tutorial we learn how to install perl-Readonly.noarch in Amazon Linux 2. perl-Readonly.noarch is Facility for creating read-only scalars, arrays, hashes

Introduction

In this tutorial we learn how to install perl-Readonly.noarch on Amazon Linux 2.

What is perl-Readonly.noarch

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 to install perl-Readonly.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Readonly.noarch.

Install perl-Readonly.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install perl-Readonly.noarch using yum by running the following command:

sudo yum -y install perl-Readonly.noarch

How To Uninstall perl-Readonly.noarch on Amazon Linux 2

To uninstall only the perl-Readonly.noarch package we can use the following command:

sudo yum remove perl-Readonly.noarch

perl-Readonly.noarch Package Contents on Amazon Linux 2

/usr/share/doc/perl-Readonly-1.03
/usr/share/doc/perl-Readonly-1.03/Changes
/usr/share/doc/perl-Readonly-1.03/README
/usr/share/doc/perl-Readonly-1.03/benchmark.pl
/usr/share/doc/perl-Readonly-1.03/t
/usr/share/doc/perl-Readonly-1.03/t/array.t
/usr/share/doc/perl-Readonly-1.03/t/deepa.t
/usr/share/doc/perl-Readonly-1.03/t/deeph.t
/usr/share/doc/perl-Readonly-1.03/t/deeps.t
/usr/share/doc/perl-Readonly-1.03/t/docs.t
/usr/share/doc/perl-Readonly-1.03/t/export.t
/usr/share/doc/perl-Readonly-1.03/t/hash.t
/usr/share/doc/perl-Readonly-1.03/t/readonly.t
/usr/share/doc/perl-Readonly-1.03/t/reassign.t
/usr/share/doc/perl-Readonly-1.03/t/scalar.t
/usr/share/doc/perl-Readonly-1.03/t/tie.t
/usr/share/man/man3/Readonly.3pm.gz
/usr/share/perl5/vendor_perl/Readonly.pm

References

Summary

In this tutorial we learn how to install perl-Readonly.noarch on Amazon Linux 2 using yum.