From 020f89debacd5069c45fb4a64a35562653d01dfd Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Sep 03 2013 15:00:52 +0000 Subject: Initial import (perl-Hash-StoredIterator-0.007-2) 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(). --- diff --git a/.gitignore b/.gitignore index e69de29..cc702aa 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Hash-StoredIterator-[0-9.]*.tar.gz diff --git a/perl-Hash-StoredIterator.spec b/perl-Hash-StoredIterator.spec new file mode 100644 index 0000000..201daa3 --- /dev/null +++ b/perl-Hash-StoredIterator.spec @@ -0,0 +1,70 @@ +Name: perl-Hash-StoredIterator +Version: 0.007 +Release: 2%{?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 +* Sun Aug 18 2013 Paul Howarth - 0.007-2 +- Sanitize for Fedora submission + +* Thu Aug 15 2013 Paul Howarth - 0.007-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..f117f7e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f7ecdd7327bae05e939d942c3b70ab57 Hash-StoredIterator-0.007.tar.gz