How to Install and Uninstall perl-Devel-EnforceEncapsulation.noarch Package on Amazon Linux 2

Last updated: May 14,2024

1. Install "perl-Devel-EnforceEncapsulation.noarch" package

Please follow the guidance below to install perl-Devel-EnforceEncapsulation.noarch on Amazon Linux 2

$ sudo yum makecache $ sudo yum install perl-Devel-EnforceEncapsulation.noarch

2. Uninstall "perl-Devel-EnforceEncapsulation.noarch" package

This guide covers the steps necessary to uninstall perl-Devel-EnforceEncapsulation.noarch on Amazon Linux 2:

$ sudo yum remove perl-Devel-EnforceEncapsulation.noarch $ sudo yum autoremove

3. Information about the perl-Devel-EnforceEncapsulation.noarch package on Amazon Linux 2

Loaded plugins: ovl, priorities
Available Packages
Name : perl-Devel-EnforceEncapsulation
Arch : noarch
Version : 0.50
Release : 8.amzn2
Size : 23 k
Repo : amzn2-core/2/x86_64
Summary : Find access violations to blessed objects
URL : http://search.cpan.org/dist/Devel-EnforceEncapsulation/
License : GPL+ or Artistic
Description : Encapsulation is the practice of creating subroutines to access
: the properties of a class instead of accessing those properties
: directly. The advantage of good encapsulation is that the author
: is permitted to change the internal implementation of a class
: without breaking its usage.
:
: Object-oriented programming in Perl is most commonly implemented
: via blessed hashes. This practice makes it easy for users of a
: class to violate encapsulation by simply accessing the hash values
: directly. Although less common, the same applies to classes
: implemented via blessed arrays, scalars, filehandles, etc.
:
: This module is a hack to block those direct accesses. If you try
: to access a hash value of an object from its own class, or a
: superclass or subclass, all goes well. If you try to access a hash
: value from any other package, an exception is thrown. The same
: applies to the scalar value of a blessed scalar, entry in a
: blessed array, etc.
:
: To be clear: this class is NOT intended for strict enforcement of
: encapsulation. If you want bullet-proof encapsulation, use
: inside-out objects or the like. Instead, this module is intended
: to be a development or debugging aid in catching places where
: direct access is used against classes implemented as blessed
: hashes.
:
: To repeat: the encapsulation enforced here is a hack and is easily
: circumvented. Please use this module for good (finding bugs), not
: evil (making life harder for downstream developers).