3 %bcond_without tests # do not perform "make test"
6 %define pnam RefHash-Weak
7 %include /usr/lib/rpm/macros.perl
8 Summary: Tie::RefHash::Weak - A Tie::RefHash subclass with weakened references in the keys
9 Name: perl-Tie-RefHash-Weak
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/Tie/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: c7c6793fab417c9761d88f596dfb32e9
17 URL: http://search.cpan.org/dist/Tie-RefHash-Weak/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl-Task-Weaken
22 BuildRequires: perl-Variable-Magic
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The Tie::RefHash module can be used to access hashes by reference.
29 This is useful when you index by object, for example.
31 The problem with Tie::RefHash, and cross indexing, is that sometimes
32 the index should not contain strong references to the objecs.
33 Tie::RefHash's internal structures contain strong references to the
34 key, and provide no convenient means to make those references weak.
36 This subclass of Tie::RefHash has weak keys, instead of strong ones.
37 The values are left unaltered, and you'll have to make sure there are
38 no strong references there yourself.
41 %setup -q -n %{pdir}-%{pnam}-%{version}
44 %{__perl} Makefile.PL \
48 %{?with_tests:%{__make} test}
51 rm -rf $RPM_BUILD_ROOT
52 %{__make} pure_install \
53 DESTDIR=$RPM_BUILD_ROOT
56 rm -rf $RPM_BUILD_ROOT
59 %defattr(644,root,root,755)
61 %{perl_vendorlib}/Tie/RefHash/Weak.pm
62 %{_mandir}/man3/Tie::RefHash::Weak.3pm*