commit f1bbfecb549e42f1a478dbc1bcb8b2e77a3d01f6 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Tue Apr 8 13:05:15 2014 +0100 Initial import (perl-Data-Tumbler-0.005-2) The tumble() method calls a sequence of 'provider' code references, each of which returns a hash. The first provider is called and then, for each hash item it returns, the tumble() method recurses to call the next provider. The recursion continues until there are no more providers to call, at which point the consumer code reference is called. Effectively the providers create a tree of combinations and the consumer is called at the leaves of the tree. If a provider returns no items then that part of the tree is pruned. Further providers, if any, are not called and the consumer is not called. During a call to tumble() three values are passed down through the tree and into the consumer: path, context, and payload. The path and context are derived from the names and values of the hashes returned by the providers. Typically the path defines the current "path" through the tree of combinations. The providers are passed the current path, context, and payload. The payload is cloned at each level of recursion so that any changes made to it by providers are only visible within the scope of the generated sub-tree. .gitignore | 1 + perl-Data-Tumbler.spec | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 82 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..fb00dda 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Data-Tumbler-[0-9.]*.tar.gz diff --git a/perl-Data-Tumbler.spec b/perl-Data-Tumbler.spec new file mode 100644 index 0000000..59a223d --- /dev/null +++ b/perl-Data-Tumbler.spec @@ -0,0 +1,80 @@ +Name: perl-Data-Tumbler +Version: 0.005 +Release: 2%{?dist} +Summary: Dynamic generation of nested combinations +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Data-Tumbler/ +Source0: http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/Data-Tumbler-%{version}.tar.gz +BuildArch: noarch +# Build +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) +# Module +BuildRequires: perl(Carp) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Test Suite (upstream wants Test::Most ≥ 0.33 but test suite works fine with Test::Most 0.11) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(List::Util) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Most) >= 0.11 +BuildRequires: perl(Time::HiRes) +# Runtime +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%description +The tumble() method calls a sequence of 'provider' code references, each of +which returns a hash. The first provider is called and then, for each hash item +it returns, the tumble() method recurses to call the next provider. The +recursion continues until there are no more providers to call, at which point +the consumer code reference is called. Effectively the providers create a tree +of combinations and the consumer is called at the leaves of the tree. If a +provider returns no items then that part of the tree is pruned. Further +providers, if any, are not called and the consumer is not called. + +During a call to tumble() three values are passed down through the tree and +into the consumer: path, context, and payload. The path and context are derived +from the names and values of the hashes returned by the providers. Typically +the path defines the current "path" through the tree of combinations. The +providers are passed the current path, context, and payload. The payload is +cloned at each level of recursion so that any changes made to it by providers +are only visible within the scope of the generated sub-tree. + +%prep +%setup -q -n Data-Tumbler-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +%{_fixperms} %{buildroot} + +%check +make test + +%files +%doc Changes README +%{perl_vendorlib}/Data/ +%{_mandir}/man3/Data::Tumbler.3pm* + +%changelog +* Mon Apr 7 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.005-2 +- Sanitize for Fedora submission + +* Mon Mar 24 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.005-1 +- Update to 0.005 + - Make a test from more detailed example in 0.004 +- Package upstream's new README file +- BR: perl(List::Util) for new test +- Update patch for building with Test::More < 0.88 + +* Sun Mar 23 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.004-1 +- Update to 0.004 + - Improve the docs with a more detailed example + +* Fri Mar 21 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 0.003-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..ce075da 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2660fabb69d4e77e1d519093f763ea02 Data-Tumbler-0.005.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel