Filewatcher File Search File Search
Catalog
Content Search
» » » » » »

perl-Devel-EnforceEncapsulation

Find access violations to blessed objects

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).

Homepage:
Package version:0.50
Architecture:src
Distribution:Fedora
Filename:perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm

Browse inside perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm

14.93 KB2014-11-28Devel-EnforceEncapsulation-0.50.tgz  view  784+ mirrors
2.04 KB2014-11-28HEADER  view  2 mirrors
3.01 KB2014-11-28perl-Devel-EnforceEncapsulation.spec  view

Download perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm

2012-01-27  ftp://ftp.pbone.net/…e/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp.fr.freshrpms.net/…/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp.cuhk.hk/…rce/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp.itep.ru/…rce/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp.iij.ad.jp/…e/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp.solnet.ch/…e/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://mirror.schlundtech.de/…p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://mirrors.kernel.org/…MS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://mirrors.nic.cz/…/SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://mirror2.etf.bg.ac.rs/…/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://ftp-stud.fht-esslingen.de/…perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://releases.ubuntu.cz/…MS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://linux.mathematik.tu-darmstadt.de/…perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://speculum.rbc.ru/…SRPMS/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
2012-01-27  ftp://chernabog.cc.vt.edu/…S/p/perl-Devel-EnforceEncapsulation-0.50-5.fc17.src.rpm
more download mirrors»
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com