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