Blob Blame History Raw
Name:		perl-Hash-StoredIterator
Version:	0.007
Release:	8%{?dist}
Summary:	Functions for accessing a hash's internal iterator
License:	GPL+ or Artistic
Group:		Development/Libraries
URL:		https://metacpan.org/release/Hash-StoredIterator
Source0:	http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Hash-StoredIterator-%{version}.tar.gz
BuildRequires:	perl >= 4:5.10.0
BuildRequires:	perl(B)
BuildRequires:	perl(base)
BuildRequires:	perl(Carp)
BuildRequires:	perl(Exporter)
BuildRequires:	perl(ExtUtils::CBuilder)
BuildRequires:	perl(ExtUtils::ParseXS) >= 3.15
BuildRequires:	perl(ExtUtils::testlib)
BuildRequires:	perl(Fennec) >= 2.004
BuildRequires:	perl(Module::Build) >= 0.40
BuildRequires:	perl(strict)
BuildRequires:	perl(warnings)
BuildRequires:	perl(XSLoader)
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

# Avoid provides for private shared objects
%{?perl_default_filter}

%description
In perl all hashes have an internal iterator. This iterator is used by the
each() function, as well as by keys() and values(). Because these all share use
of the same iterator, they tend to interact badly with each other when nested.

Hash::StoredIterator gives you access to get, set, and init the iterator inside
a hash. This allows you to store the current iterator, use each / keys / values
etc., and then restore the iterator, which helps you to ensure you do not
interact badly with other users of the iterator.

Along with low-level get / set / init functions, there are also 2 variations of
each() that let you act upon each key/value pair in a safer way than vanilla
each().

This module can also export new implementations of keys() and values() that
stash and restore the iterator so that they are safe to use within each().

%prep
%setup -q -n Hash-StoredIterator-%{version}

%build
perl Build.PL installdirs=vendor optimize="%{optflags}"
./Build

%install
./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
%{_fixperms} %{buildroot}

%check
./Build test

%files
%doc README
%{perl_vendorarch}/auto/Hash/
%{perl_vendorarch}/Hash/
%{_mandir}/man3/Hash::StoredIterator.3pm*

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.007-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-6
- Perl 5.22 rebuild

* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-5
- Perl 5.20 rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.007-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.007-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 18 2013 Paul Howarth <paul@city-fan.org> - 0.007-2
- Sanitize for Fedora submission

* Thu Aug 15 2013 Paul Howarth <paul@city-fan.org> - 0.007-1
- Initial RPM version