perl-Devel-EnforceEncapsulation - Find access violations to blessed objects

Property Value
Distribution CentOS 7
Repository CentOS x86_64
Package name perl-Devel-EnforceEncapsulation
Package version 0.50
Package release 8.el7
Package architecture noarch
Package type rpm
Installed size 39.15 KB
Download size 23.38 KB
Official Mirror
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).


Package Version Architecture Repository
perl-Devel-EnforceEncapsulation - - -


Name Value
perl(:MODULE_COMPAT_5.16.3) -
perl(Carp) -
perl(English) -
perl(overload) -
perl(strict) -
perl(warnings) -


Name Value
perl(Devel::EnforceEncapsulation) = 0.50
perl-Devel-EnforceEncapsulation = 0.50-8.el7


Type URL
Binary Package perl-Devel-EnforceEncapsulation-0.50-8.el7.noarch.rpm
Source Package perl-Devel-EnforceEncapsulation-0.50-8.el7.src.rpm

Install Howto

Install perl-Devel-EnforceEncapsulation rpm package:

# yum install perl-Devel-EnforceEncapsulation




2013-12-27 - Daniel Mach <> - 0.50-8
- Mass rebuild 2013-12-27
2012-08-20 - Daniel Mach <> - 0.50-7.1
- Rebuild for perl 5.16
2012-07-20 - Fedora Release Engineering <> - 0.50-7
- Rebuilt for
2012-06-12 - Petr Pisar <> - 0.50-6
- Perl 5.16 rebuild
2012-01-11 - Paul Howarth <> - 0.50-5
- BR: perl(Carp) and perl(English)
2011-06-20 - Marcela Mašláňová <> - 0.50-4
- Perl mass rebuild
2011-04-11 - Paul Howarth <> - 0.50-3
- Clean up for modern rpmbuild
2011-04-11 - Paul Howarth <> - 0.50-2
- Nobody else likes macros for commands
2011-03-18 - Paul Howarth <> - 0.50-1
- Initial RPM version

See Also

Package Description
perl-Devel-Leak-0.03-22.el7.x86_64.rpm Utility for looking for perl objects that are not reclaimed
perl-Devel-StackTrace-1.30-2.el7.noarch.rpm Perl module implementing stack trace and stack trace frame objects
perl-Devel-Symdump-2.10-2.el7.noarch.rpm A Perl module for inspecting Perl's symbol table
perl-Digest-1.17-245.el7.noarch.rpm Modules that calculate message digests
perl-Digest-HMAC-1.03-5.el7.noarch.rpm Keyed-Hashing for Message Authentication
perl-Digest-MD5-2.52-3.el7.x86_64.rpm Perl interface to the MD5 algorithm
perl-Digest-SHA-5.85-4.el7.x86_64.rpm Perl extension for SHA-1/224/256/384/512
perl-Digest-SHA1-2.13-9.el7.x86_64.rpm Digest-SHA1 Perl module
perl-Dist-CheckConflicts-0.06-2.el7.noarch.rpm Declare version conflicts for your dist
perl-Email-Address-1.898-3.el7.noarch.rpm RFC 2822 Address Parsing and Creation
perl-Encode-2.51-7.el7.x86_64.rpm Character encodings in Perl
perl-Encode-Detect-1.01-13.el7.x86_64.rpm Encode::Encoding subclass that detects the encoding of data
perl-Encode-Locale-1.03-5.el7.noarch.rpm Determine the locale encoding
perl-Encode-devel-2.51-7.el7.x86_64.rpm Perl Encode Module Generator
perl-Env-1.04-2.el7.noarch.rpm Perl module that imports environment variables as scalars or arrays