source: projects/specs/trunk/p/perl-Devel-EnforceEncapsulation/perl-Devel-EnforceEncapsulation-vl.spec @ 9187

Revision 9187, 3.4 KB checked in by inagaki, 9 years ago (diff)

2014-12-23 Ryoichi INAGAKI <ryo1@…>

  • perl-CGI-FormBuilder?, perl-Devel-{EnforceEncapsulation?, GlobalDestruction?}, perl-Moose, perl-Net-{Pcap, Radius, Telnet, Write}, perl-Template-Toolkit, perl-Text-Unidecode, perl-XML-RSS: updated
  • perl-CGI-SSI, perl-Geography-Countries, perl-MIME-Lite-TT, perl-MP3-Info, perl-Text-Glob: rebuilt
  • perl-Sub-Exporter-Progressive: new


Line 
1Name:           perl-Devel-EnforceEncapsulation
2Version:        0.51
3Release:        1%{?_dist_release}
4Summary:        Find access violations to blessed objects
5Group:          Development/Libraries
6License:        GPL+ or Artistic
7URL:            http://search.cpan.org/dist/Devel-EnforceEncapsulation/
8Source0:        http://search.cpan.org/CPAN/authors/id/C/CL/CLOTHO/Devel-EnforceEncapsulation-%{version}.tar.gz
9
10BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
11BuildArch:      noarch
12BuildRequires:  perl(Carp)
13BuildRequires:  perl(English)
14BuildRequires:  perl(ExtUtils::MakeMaker)
15BuildRequires:  perl(Test::More)
16BuildRequires:  perl(Test::Pod)
17BuildRequires:  perl(Test::Pod::Coverage)
18Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
19
20Vendor:         Project Vine
21Distribution:   Vine Linux
22Packager:       shaolin
23
24%description
25Encapsulation is the practice of creating subroutines to access the properties
26of a class instead of accessing those properties directly. The advantage of
27good encapsulation is that the author is permitted to change the internal
28implementation of a class without breaking its usage.
29
30Object-oriented programming in Perl is most commonly implemented via blessed
31hashes. This practice makes it easy for users of a class to violate
32encapsulation by simply accessing the hash values directly. Although less
33common, the same applies to classes implemented via blessed arrays, scalars,
34filehandles, etc.
35
36This module is a hack to block those direct accesses. If you try to access a
37hash value of an object from its own class, or a superclass or subclass, all
38goes well. If you try to access a hash value from any other package, an
39exception is thrown. The same applies to the scalar value of a blessed scalar,
40entry in a blessed array, etc.
41
42To be clear: this class is NOT intended for strict enforcement of
43encapsulation. If you want bullet-proof encapsulation, use inside-out objects
44or the like. Instead, this module is intended to be a development or debugging
45aid in catching places where direct access is used against classes implemented
46as blessed hashes.
47
48To repeat: the encapsulation enforced here is a hack and is easily
49circumvented. Please use this module for good (finding bugs), not evil (making
50life harder for downstream developers).
51
52%prep
53%setup -q -n Devel-EnforceEncapsulation-%{version}
54
55%build
56perl Makefile.PL INSTALLDIRS=vendor
57make %{?_smp_mflags}
58
59%install
60make pure_install DESTDIR=%{buildroot}
61find %{buildroot} -type f -name .packlist -exec rm -f {} \;
62find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
63%{_fixperms} %{buildroot}
64
65%check
66make test AUTHOR_TEST=1 AUTHOR_TEST_CDOLAN=1
67
68%files
69%defattr(-,root,root,-)
70%doc CHANGES LICENSE README
71%{perl_vendorlib}/Devel/
72%{_mandir}/man3/Devel::EnforceEncapsulation.3pm*
73
74%changelog
75* Tue Dec 23 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.51-1
76- updated to 0.51
77- built with perl 5.16.3
78
79* Thu Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.50-2
80- rebuild
81
82* Fri Feb 24 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.50-1
83- initial build for Vine Linux
84
85* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.50-5
86- BR: perl(Carp) and perl(English)
87
88* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.50-4
89- Perl mass rebuild
90
91* Mon Apr 11 2011 Paul Howarth <paul@city-fan.org> - 0.50-3
92- Clean up for modern rpmbuild
93
94* Mon Apr 11 2011 Paul Howarth <paul@city-fan.org> - 0.50-2
95- Nobody else likes macros for commands
96
97* Fri Mar 18 2011 Paul Howarth <paul@city-fan.org> - 0.50-1
98- Initial RPM version
Note: See TracBrowser for help on using the repository browser.