Bug 695281 - Review Request: perl-Devel-EnforceEncapsulation - Find access violations to blessed objects
Summary: Review Request: perl-Devel-EnforceEncapsulation - Find access violations to b...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-11 10:16 UTC by Paul Howarth
Modified: 2011-05-11 08:46 UTC (History)
2 users (show)

Fixed In Version: perl-Devel-EnforceEncapsulation-0.50-3.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-11 08:46:12 UTC
Type: ---
Embargoed:
mmaslano: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)

Description Paul Howarth 2011-04-11 10:16:57 UTC
Spec URL:
http://subversion.city-fan.org/repos/cfo-repo/perl-Devel-EnforceEncapsulation/branches/fedora/perl-Devel-EnforceEncapsulation.spec
SRPM URL:
http://www.city-fan.org/~paul/extras/perl-Devel-EnforceEncapsulation/perl-Devel-EnforceEncapsulation-0.50-3.fc16.src.rpm

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



This package is used in the author tests of Perl::Critic.

Comment 1 Marcela Mašláňová 2011-04-22 11:07:54 UTC
- rpmlint OK
perl-Devel-EnforceEncapsulation.noarch: W: spelling-error %description -l en_US filehandles -> file handles, file-handles, mishandles
perl-Devel-EnforceEncapsulation.src: W: spelling-error %description -l en_US filehandles -> file handles, file-handles, mishandles
perl-Devel-EnforceEncapsulation.src: E: unknown-key GPG#b56a8bac

- package must be named according to Guidelines OK
- spec file name must match the base package %{name} OK
- package must meet the Packaging Guidelines OK
- package must be licensed with Fedora approved license OK
- license field must match actual license OK
- text of the license in its own file must be included in %doc OK
- sources must match the upstream source OK
- package MUST successfully compile and build OK
http://koji.fedoraproject.org/koji/taskinfo?taskID=3018370
- architecture listed in ExcludeArch MUST have a bug filed in bugzilla OK
- build dependencies must be listed in BuildRequires OK
- handle locales properly with %find_lang macro OK
- shared library files must call ldconfig in %post(un) OK
- packages must NOT bundle system libraries OK
- package must own all directories that it creates OK
- permissions on files must be set properly OK
- package must consistently use macros OK
- package must contain code, or permissable content OK
- large documentation must go in a -doc OK
- %doc must not affect the runtime of the application OK
- header files must be in a -devel package OK
- static libraries must be in a -static package OK
- library files that end in .so (without suffix) must go in a -devel OK
- devel package usually require base package OK
- packages must NOT contain any .la libtool archives OK
- GUI applications must include a %{name}.desktop file OK
- packages must not own files or directories already owned by other packages OK

APPROVED

Comment 2 Paul Howarth 2011-04-22 20:51:28 UTC
New Package SCM Request
=======================
Package Name: perl-Devel-EnforceEncapsulation
Short Description: Find access violations to blessed objects
Owners: pghmcfc
Branches: F-15 EL-6
InitialCC: perl-sig

Thanks for the review again Marcela.

Comment 3 Jason Tibbitts 2011-04-24 14:44:13 UTC
Git done (by process-git-requests).

Comment 4 Fedora Update System 2011-04-24 21:33:00 UTC
perl-Devel-EnforceEncapsulation-0.50-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/perl-Devel-EnforceEncapsulation-0.50-3.el6

Comment 5 Fedora Update System 2011-04-24 21:33:08 UTC
perl-Devel-EnforceEncapsulation-0.50-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-Devel-EnforceEncapsulation-0.50-3.fc15

Comment 6 Fedora Update System 2011-04-28 19:19:02 UTC
perl-Devel-EnforceEncapsulation-0.50-3.fc15 has been pushed to the Fedora 15 stable repository.

Comment 7 Fedora Update System 2011-05-10 18:58:12 UTC
perl-Devel-EnforceEncapsulation-0.50-3.el6 has been pushed to the Fedora EPEL 6 stable repository.


Note You need to log in before you can comment on or make changes to this bug.