diff -Nru libdata-stream-bulk-perl-0.07/Changes libdata-stream-bulk-perl-0.08/Changes --- libdata-stream-bulk-perl-0.07/Changes 2009-07-11 07:56:50.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/Changes 2010-08-24 11:40:39.000000000 +0000 @@ -1,5 +1,8 @@ +0.08 + - Fix new warnings in Moose + 0.07 - - Fix new warnings in Moose about overwriting methods + - Fix new warnings in Moose about overwriting methods 0.06 - Fix several pod errors (Closes RT#43490) (Ryan Niebur) @@ -7,10 +10,10 @@ - Update version control notice 0.05 - - Silence some new warnings from Moose + - Silence some new warnings from Moose 0.04 - - add exclusions to role composition to avoid the new warning + - add exclusions to role composition to avoid the new warning 0.03 - - add Path::Class iterator + - add Path::Class iterator diff -Nru libdata-stream-bulk-perl-0.07/debian/changelog libdata-stream-bulk-perl-0.08/debian/changelog --- libdata-stream-bulk-perl-0.07/debian/changelog 2010-10-15 13:13:09.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/changelog 2010-08-28 14:51:21.000000000 +0000 @@ -1,3 +1,16 @@ +libdata-stream-bulk-perl (0.08-1) unstable; urgency=low + + * New upstream release. + * Bump build-dep on libmoose-perl to >= 0.89 for "-excludes". + * No longer run POD tests; remove build-dep on libtest-pod-perl. + * debian/copyright: Formatting changes for current DEP-5 proposal; refer to + /usr/share/common-licenses/GPL-1; update years of copyright; refer to + "Debian systems" instead of "Debian GNU/Linux systems". + * Use debhelper compat level 8. + * Bump Standards-Version to 3.9.1. + + -- Ansgar Burchardt Sat, 28 Aug 2010 23:33:35 +0900 + libdata-stream-bulk-perl (0.07-1) unstable; urgency=low [ Jonathan Yu ] diff -Nru libdata-stream-bulk-perl-0.07/debian/compat libdata-stream-bulk-perl-0.08/debian/compat --- libdata-stream-bulk-perl-0.07/debian/compat 2010-10-15 13:13:09.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/compat 2010-08-28 14:51:21.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru libdata-stream-bulk-perl-0.07/debian/control libdata-stream-bulk-perl-0.08/debian/control --- libdata-stream-bulk-perl-0.07/debian/control 2010-10-15 13:13:09.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/control 2010-08-28 14:51:21.000000000 +0000 @@ -1,16 +1,16 @@ Source: libdata-stream-bulk-perl Section: perl Priority: optional -Build-Depends: debhelper (>= 7.0.50) +Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl, libnamespace-clean-perl (>= 0.08), - libtest-use-ok-perl, libsub-exporter-perl, libmoose-perl, libdbix-class-perl, + libtest-use-ok-perl, libsub-exporter-perl, libmoose-perl (>= 0.89), libdbix-class-perl, libdbi-perl, libdbd-sqlite3-perl, libpath-class-perl, libdbd-mock-perl, - libtest-tempdir-perl, libtest-pod-perl + libtest-tempdir-perl Maintainer: Debian Perl Group Uploaders: Ryan Niebur , Ansgar Burchardt , Jonathan Yu , gregor herrmann -Standards-Version: 3.8.4 +Standards-Version: 3.9.1 Homepage: http://search.cpan.org/dist/Data-Stream-Bulk/ Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdata-stream-bulk-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdata-stream-bulk-perl/ @@ -18,7 +18,7 @@ Package: libdata-stream-bulk-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, libnamespace-clean-perl (>= 0.08), - libsub-exporter-perl, libmoose-perl + libsub-exporter-perl, libmoose-perl (>= 0.89) Description: N at a time iteration API Data::Stream::Bulk is a utility for working with data streams of indefinite size. It tries to find a middle ground between one-at-a-time and all-at-once diff -Nru libdata-stream-bulk-perl-0.07/debian/copyright libdata-stream-bulk-perl-0.08/debian/copyright --- libdata-stream-bulk-perl-0.07/debian/copyright 2010-10-15 13:13:09.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/copyright 2010-08-28 14:51:21.000000000 +0000 @@ -1,30 +1,30 @@ -Format-Specification: - http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 -Upstream-Maintainer: Yuval Kogman -Upstream-Source: http://search.cpan.org/dist/Data-Stream-Bulk/ -Upstream-Name: Data-Stream-Bulk +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Maintainer: Yuval Kogman +Source: http://search.cpan.org/dist/Data-Stream-Bulk/ +Name: Data-Stream-Bulk Files: * -Copyright: 2008 Yuval Kogman -License-Alias: Perl -License: Artistic | GPL-1+ +Copyright: 2010, Yuval Kogman +License: Artistic or GPL-1+ Files: debian/* Copyright: 2009, Jonathan Yu 2009, Ryan Niebur 2010, gregor herrmann -License: Artistic | GPL-1+ +License: Artistic or GPL-1+ License: Artistic - This program is free software; you can redistribute it and/or modify - it under the terms of the Artistic License, which comes with Perl. - On Debian GNU/Linux systems, the complete text of the Artistic License - can be found in `/usr/share/common-licenses/Artistic' + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + . + On Debian systems, the complete text of the Artistic License + can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL' + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + . + On Debian systems, the complete text of version 1 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-1'. diff -Nru libdata-stream-bulk-perl-0.07/debian/rules libdata-stream-bulk-perl-0.08/debian/rules --- libdata-stream-bulk-perl-0.07/debian/rules 2010-10-15 13:13:09.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/rules 2010-08-28 14:51:21.000000000 +0000 @@ -2,6 +2,3 @@ %: dh $@ - -override_dh_auto_test: - TEST_POD=1 dh_auto_test diff -Nru libdata-stream-bulk-perl-0.07/debian/source/format libdata-stream-bulk-perl-0.08/debian/source/format --- libdata-stream-bulk-perl-0.07/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/debian/source/format 2010-10-15 13:13:10.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libdata-stream-bulk-perl-0.07/dist.ini libdata-stream-bulk-perl-0.08/dist.ini --- libdata-stream-bulk-perl-0.07/dist.ini 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/dist.ini 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,20 @@ +name = Data-Stream-Bulk +version = 0.08 +author = Yuval Kogman +license = Perl_5 +copyright_holder = Yuval Kogman + +[@FLORA] +dist = Data-Stream-Bulk +repository_at = github +github_user = nothingmuch +authority = cpan:NUFFIN +auto_prereq = 0 + +[Prereqs] +namespace::clean = 0 +Moose = 0 +Sub::Exporter = 0 + +[Prereqs / TestRequires] +Test::use::ok = 0 diff -Nru libdata-stream-bulk-perl-0.07/.gitignore libdata-stream-bulk-perl-0.08/.gitignore --- libdata-stream-bulk-perl-0.07/.gitignore 2009-07-11 07:55:27.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -.* -!.gitignore -Makefile* -!Makefile.PL -META.yml -blib -build -inc -pm_to_blib -MANIFEST* -!MANIFEST.SKIP -Debian* -README -Data-Stream-Bulk-* -*.bs diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Array.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Array.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Array.pm 2009-04-23 23:27:59.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Array.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,86 +1,94 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Array; +BEGIN { + $Data::Stream::Bulk::Array::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Array::VERSION = '0.08'; +} +# ABSTRACT: L wrapper for simple arrays. + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk) => { excludes => [qw/loaded filter list_cat/] }; +with qw(Data::Stream::Bulk) => { -excludes => [qw/loaded filter list_cat/] }; has array => ( - isa => "ArrayRef", - reader => "_array", - writer => "_set_array", - clearer => "_clear_array", - predicate => "_has_array", - required => 1, + isa => "ArrayRef", + reader => "_array", + writer => "_set_array", + clearer => "_clear_array", + predicate => "_has_array", + required => 1, ); sub is_done { - my $self = shift; - !$self->_has_array; + my $self = shift; + !$self->_has_array; } sub next { - my $self = shift; + my $self = shift; - if ( my $array = $self->_array ) { - $self->_clear_array; - return $array; - } else { - return; - } + if ( my $array = $self->_array ) { + $self->_clear_array; + return $array; + } else { + return; + } } # squish several arrays into one sub list_cat { - my ( $self, @rest ) = @_; + my ( $self, @rest ) = @_; - return $self unless @rest; + return $self unless @rest; - my @arrays = ( $self ); + my @arrays = ( $self ); - # fetch all adjacent arrays - push @arrays, shift @rest while @rest and $rest[0]->isa(__PACKAGE__); + # fetch all adjacent arrays + push @arrays, shift @rest while @rest and $rest[0]->isa(__PACKAGE__); - if ( @arrays > 1 ) { - my @cat; - push @cat, @$_ for map { $_->_array } @arrays; - return __PACKAGE__->new( - array => \@cat, - )->cat( @rest ); - } else { - my $head = shift @rest; - return ( $self, $head->list_cat(@rest) ); - } + if ( @arrays > 1 ) { + my @cat; + push @cat, @$_ for map { $_->_array } @arrays; + return __PACKAGE__->new( + array => \@cat, + )->cat( @rest ); + } else { + my $head = shift @rest; + return ( $self, $head->list_cat(@rest) ); + } } sub filter { - my ( $self, $filter ) = @_; - local $_ = $self->next; - $self->_set_array( $filter->($_) ); - return $self; + my ( $self, $filter ) = @_; + local $_ = $self->next; + $self->_set_array( $filter->($_) ); + return $self; } sub loaded { 1 } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Array - L wrapper for simple arrays. =head1 SYNOPSIS - return Data::Stream::Bulk::Array->new( - array => \@results, - ); + return Data::Stream::Bulk::Array->new( + array => \@results, + ); =head1 DESCRIPTION @@ -92,38 +100,42 @@ =head1 ATTRIBUTES -=over 4 - -=item array +=head2 array The array reference to wrap. -=back - =head1 METHODS -=over 4 - -=item next +=head2 next Returns the array reference on the first invocation, and nothing thereafter. -=item is_done +=head2 is_done Returns true if C has been called. -=item list_cat +=head2 list_cat Squishes adjacent arrays into a new array. -=item filter $filter +=head2 filter $filter Immediately applies C<$filter> to the internal array and returns C<$self>. -=item loaded +=head2 loaded Returns true -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut + diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Callback.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Callback.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Callback.pm 2009-06-26 23:42:06.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Callback.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,48 +1,57 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Callback; +BEGIN { + $Data::Stream::Bulk::Callback::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Callback::VERSION = '0.08'; +} +# ABSTRACT: Callback based bulk iterator + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk::DoneFlag) => { excludes => [qw(is_done finished)] }; +with qw(Data::Stream::Bulk::DoneFlag) => { -excludes => [qw(is_done finished)] }; has callback => ( - isa => "CodeRef|Str", - is => "ro", - required => 1, - clearer => "finished", + isa => "CodeRef|Str", + is => "ro", + required => 1, + clearer => "finished", ); sub get_more { - my $self = shift; - my $cb = $self->callback; - $self->$cb; + my $self = shift; + my $cb = $self->callback; + $self->$cb; } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; + -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Callback - Callback based bulk iterator =head1 SYNOPSIS - Data::Stream::Bulk::Callback->new( - callback => sub { - if ( @more_items = get_some() ) { - return \@more_items; - } else { - return; # done - } - }, - } + Data::Stream::Bulk::Callback->new( + callback => sub { + if ( @more_items = get_some() ) { + return \@more_items; + } else { + return; # done + } + }, + } =head1 DESCRIPTION @@ -50,28 +59,31 @@ =head1 ATTRIBUTES -=over 4 - -=item callback +=head2 callback The subroutine that is called when more items are needed. Should return an array reference for the next block, or a false value if there is nothing left. -=back - =head1 METHODS -=over 4 - -=item get_more +=head2 get_more See L. Reinvokes C. -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Cat.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Cat.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Cat.pm 2009-04-23 23:27:59.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Cat.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,66 +1,76 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Cat; +BEGIN { + $Data::Stream::Bulk::Cat::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Cat::VERSION = '0.08'; +} +# ABSTRACT: Concatenated streams + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk) => { excludes => 'list_cat' }; +with qw(Data::Stream::Bulk) => { -excludes => 'list_cat' }; has streams => ( - isa => "ArrayRef[Data::Stream::Bulk]", - is => "ro", - required => 1, + isa => "ArrayRef[Data::Stream::Bulk]", + is => "ro", + required => 1, ); sub is_done { - my $self = shift; - @{ $self->streams } == 0; + my $self = shift; + @{ $self->streams } == 0; } sub next { - my $self = shift; + my $self = shift; - my $s = $self->streams; + my $s = $self->streams; - return unless @$s; + return unless @$s; - my $next; + my $next; - until ( $next = @$s && $s->[0]->next ) { - shift @$s; - return unless @$s; - } + until ( $next = @$s && $s->[0]->next ) { + shift @$s; + return unless @$s; + } - return $next; + return $next; } sub list_cat { - my ( $self, @rest ) = @_; - my ( $head, @tail ) = ( @{ $self->streams }, @rest ); - return () unless $head; - return $head->list_cat(@tail); + my ( $self, @rest ) = @_; + my ( $head, @tail ) = ( @{ $self->streams }, @rest ); + return () unless $head; + return $head->list_cat(@tail); } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; + -__END__ + +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Cat - Concatenated streams =head1 SYNOPSIS - use Data::Stream::Bulk::Cat; + use Data::Stream::Bulk::Cat; - Data::Stream::Bulk::Cat->new( - streams => [ $s1, $s2, $s3 ], - ); + Data::Stream::Bulk::Cat->new( + streams => [ $s1, $s2, $s3 ], + ); =head1 DESCRIPTION @@ -68,17 +78,15 @@ =head1 METHODS -=over 4 - -=item is_done +=head2 is_done Returns true if the list of streams is empty. -=item next +=head2 next Returns the next block from the next ready stream. -=item list_cat +=head2 list_cat Breaks down the internal list of streams, and delegates C to the first one. @@ -86,8 +94,16 @@ Has the effect of inlining the nested streams into the total concatenation, allowing L to work better. -=back +=head1 AUTHOR -=cut +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DBIC.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DBIC.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DBIC.pm 2009-07-11 07:55:28.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DBIC.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,46 +1,54 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::DBIC; +BEGIN { + $Data::Stream::Bulk::DBIC::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::DBIC::VERSION = '0.08'; +} +# ABSTRACT: Iterate DBIC resultsets with L + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk::DoneFlag) => { excludes => [qw(is_done finished)] }; +with qw(Data::Stream::Bulk::DoneFlag) => { -excludes => [qw(is_done finished)] }; has resultset => ( - isa => "Object", - clearer => "finished", - handles => { next_row => "next" }, - required => 1, + isa => "Object", + clearer => "finished", + handles => { next_row => "next" }, + required => 1, ); sub get_more { - my $self = shift; + my $self = shift; - if ( defined( my $next = $self->next_row ) ) { - return [ $next ]; - } else { - return; - } + if ( defined( my $next = $self->next_row ) ) { + return [ $next ]; + } else { + return; + } } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::DBIC - Iterate DBIC resultsets with L =head1 SYNOPSIS - Data::Stream::Bulk::DBIC->new( - resultset => scalar($schema->rs("Foo")->search(...)) - ); + Data::Stream::Bulk::DBIC->new( + resultset => scalar($schema->rs("Foo")->search(...)) + ); =head1 DESCRIPTION @@ -56,14 +64,22 @@ =head1 METHODS -=over 4 - -=item get_more +=head2 get_more See L. Returns a single row. In the future this should return more than one row. -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut + diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DBI.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DBI.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DBI.pm 2009-07-11 07:55:28.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DBI.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,69 +1,78 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::DBI; +BEGIN { + $Data::Stream::Bulk::DBI::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::DBI::VERSION = '0.08'; +} +# ABSTRACT: N-at-a-time iteration of L statement results. + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk::DoneFlag) => { excludes => [qw/is_done all finished/] }; +with qw(Data::Stream::Bulk::DoneFlag) => { -excludes => [qw/is_done all finished/] }; has sth => ( - isa => "Object", - is => "ro", - required => 1, - handles => [qw(fetchall_arrayref)], - clearer => "finished", + isa => "Object", + is => "ro", + required => 1, + handles => [qw(fetchall_arrayref)], + clearer => "finished", ); has slice => ( - is => "ro", + is => "ro", ); has max_rows => ( - isa => "Int", - is => "rw", - default => 500, + isa => "Int", + is => "rw", + default => 500, ); sub get_more { - my $self = shift; - $self->fetchall_arrayref( $self->slice, $self->max_rows ); + my $self = shift; + $self->fetchall_arrayref( $self->slice, $self->max_rows ); } sub all { - my $self = shift; + my $self = shift; - my $all = $self->fetchall_arrayref( $self->slice ); + my $all = $self->fetchall_arrayref( $self->slice ); - $self->_set_done; + $self->_set_done; - return @$all; + return @$all; } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; + -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::DBI - N-at-a-time iteration of L statement results. =head1 SYNOPSIS - use Data::Stream::Bulk::DBI; + use Data::Stream::Bulk::DBI; - my $sth = $dbh->prepare("SELECT hate FROM sql"); # very big resultset - $sth->execute; + my $sth = $dbh->prepare("SELECT hate FROM sql"); # very big resultset + $sth->execute; - return Data::Stream::Bulk::DBI->new( - sth => $sth, - max_rows => $n, # how many at a time - slice => [ ... ], # if you want to pass the first param to fetchall_arrayref - ); + return Data::Stream::Bulk::DBI->new( + sth => $sth, + max_rows => $n, # how many at a time + slice => [ ... ], # if you want to pass the first param to fetchall_arrayref + ); =head1 DESCRIPTION @@ -74,41 +83,44 @@ =head1 ATTRIBUTES -=over 4 - -=item sth +=head2 sth The statement handle to call C on. -=item slice +=head2 slice Passed verbatim as the first param to C. Should usually be C, provided for completetness. -=item max_rows +=head2 max_rows The second param to C. Controls the size of each buffer. Defaults to 500. -=back - =head1 METHODS -=over 4 - -=item get_more +=head2 get_more See L. Calls C to get the next chunk of rows. -=item all +=head2 all Calls C to get the raminder of the data (without specifying C). -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DoneFlag.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DoneFlag.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/DoneFlag.pm 2009-06-26 23:38:35.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/DoneFlag.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,6 +1,12 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::DoneFlag; +BEGIN { + $Data::Stream::Bulk::DoneFlag::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::DoneFlag::VERSION = '0.08'; +} +# ABSTRACT: Implement the C method in terms of a flag + use Moose::Role; use namespace::clean -except => 'meta'; @@ -11,60 +17,61 @@ sub is_done {} has done => ( - isa => "Bool", - init_arg => undef, - reader => "is_done", - writer => "_done", + isa => "Bool", + init_arg => undef, + reader => "is_done", + writer => "_done", ); sub finished {} sub _set_done { - my $self = shift; - $self->_done(1); - $self->finished; + my $self = shift; + $self->_done(1); + $self->finished; } sub next { - my $self = shift; + my $self = shift; - unless ( $self->is_done ) { - if ( my $more = $self->get_more ) { - return $more; - } else { - $self->_set_done; - return; - } - } else { - return; - } + unless ( $self->is_done ) { + if ( my $more = $self->get_more ) { + return $more; + } else { + $self->_set_done; + return; + } + } else { + return; + } } -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME -Data::Stream::Bulk::DoneFlag - Implement the C method in terms of a -flag +Data::Stream::Bulk::DoneFlag - Implement the C method in terms of a flag =head1 SYNOPSIS - package Data::Stream::Bulk::Blah; - use Moose; + package Data::Stream::Bulk::Blah; + use Moose; - with qw(Data::Stream::Bulk::DoneFlag); + with qw(Data::Stream::Bulk::DoneFlag); - sub get_more { - if ( my @more = more() ) { - return \@more; - } else { - return; - } - } + sub get_more { + if ( my @more = more() ) { + return \@more; + } else { + return; + } + } =head1 DESCRIPTION @@ -79,13 +86,11 @@ =head1 METHODS -=over 4 - -=item is_done +=head2 is_done Returns the state of the iterator. -=item next +=head2 next As long as the iterator is not yet done, calls C. @@ -93,21 +98,27 @@ C is set, C is called, and this C does nothing on subsequent calls. -=item finished +=head2 finished A noop by default. Can be overridden if so desired. -=back +=head1 REQUIRED METHODS -=head1 REQUIRED_METHODS - -=over 4 - -=item get_more +=head2 get_more Returns the next block of data as an array ref, or a false value if no items are left. -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut + diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Filter.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Filter.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Filter.pm 2009-07-11 07:55:27.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Filter.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,6 +1,12 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Filter; +BEGIN { + $Data::Stream::Bulk::Filter::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Filter::VERSION = '0.08'; +} +# ABSTRACT: Streamed filtering (block oriented) + use Moose; use Data::Stream::Bulk; @@ -8,47 +14,49 @@ use namespace::clean -except => 'meta'; has filter => ( - isa => "CodeRef", - reader => "filter_body", - required => 1, + isa => "CodeRef", + reader => "filter_body", + required => 1, ); has stream => ( - does => "Data::Stream::Bulk", - is => "ro", - required => 1, - handles => [qw(is_done loaded)], + does => "Data::Stream::Bulk", + is => "ro", + required => 1, + handles => [qw(is_done loaded)], ); -with qw(Data::Stream::Bulk) => { excludes => 'loaded' }; +with qw(Data::Stream::Bulk) => { -excludes => 'loaded' }; sub next { - my $self = shift; + my $self = shift; - local $_ = $self->stream->next; - return $_ && ( $self->filter_body->($_) || [] ); + local $_ = $self->stream->next; + return $_ && ( $self->filter_body->($_) || [] ); } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Filter - Streamed filtering (block oriented) =head1 SYNOPSIS - use Data::Stream::Bulk::Filter; + use Data::Stream::Bulk::Filter; - Data::Stream::Bulk::Filter->new( - filter => sub { ... }, - stream => $stream, - ); + Data::Stream::Bulk::Filter->new( + filter => sub { ... }, + stream => $stream, + ); =head1 DESCRIPTION @@ -56,9 +64,7 @@ =head1 ATTRIBUTES -=over 4 - -=item filter +=head2 filter The code reference to apply to each block. @@ -68,28 +74,32 @@ output stream does B end, but instead an empty block is substituted (the parent stream controls when the stream is depleted). -=item stream +=head2 stream The stream to be filtered -=back - =head1 METHODS -=over 4 - -=item is_done +=head2 is_done -=item loaded +=head2 loaded Delegated to C -=item next +=head2 next Calls C on C and applies C if a block was returned. -=back +=head1 AUTHOR -=cut +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Nil.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Nil.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Nil.pm 2009-04-23 23:27:59.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Nil.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,11 +1,17 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Nil; +BEGIN { + $Data::Stream::Bulk::Nil::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Nil::VERSION = '0.08'; +} +# ABSTRACT: An empty L iterator + use Moose; use namespace::clean -except => 'meta'; -with qw(Data::Stream::Bulk) => { excludes => [qw/loaded filter list_cat all items/] }; +with qw(Data::Stream::Bulk) => { -excludes => [qw/loaded filter list_cat all items/] }; sub items { return () } @@ -16,10 +22,10 @@ sub is_done { 1 } sub list_cat { - my ( $self, $head, @rest ) = @_; + my ( $self, $head, @rest ) = @_; - return () unless $head; - return $head->list_cat(@rest); + return () unless $head; + return $head->list_cat(@rest); } sub filter { return $_[0] }; @@ -28,19 +34,21 @@ __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Nil - An empty L iterator =head1 SYNOPSIS - return Data::Stream::Bulk::Nil->new; # empty set + return Data::Stream::Bulk::Nil->new; # empty set =head1 DESCRIPTION @@ -48,35 +56,42 @@ =head1 METHODS -=over 4 - -=item is_done +=head2 is_done Always returns true. -=item next +=head2 next Always returns undef. -=item items +=head2 items -=item all +=head2 all Always returns the empty list. -=item list_cat +=head2 list_cat Skips $self -=item filter +=head2 filter Returns $self -=item loaded +=head2 loaded Returns true. -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Path/Class.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Path/Class.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Path/Class.pm 2009-07-11 07:55:27.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Path/Class.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,6 +1,12 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Path::Class; +BEGIN { + $Data::Stream::Bulk::Path::Class::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Path::Class::VERSION = '0.08'; +} +# ABSTRACT: L traversal + use Moose; use Path::Class; @@ -11,139 +17,141 @@ with qw(Data::Stream::Bulk); has dir => ( - isa => "Path::Class::Dir", - is => "ro", - required => 1, + isa => "Path::Class::Dir", + is => "ro", + required => 1, ); has depth_first => ( - isa => "Bool", - is => "rw", - default => 1, + isa => "Bool", + is => "rw", + default => 1, ); has only_files => ( - isa => "Bool", - is => "ro", + isa => "Bool", + is => "ro", ); has chunk_size => ( - isa => "Int", - is => "rw", - default => 250, + isa => "Int", + is => "rw", + default => 250, ); has _stack => ( - isa => "ArrayRef", - is => "ro", - default => sub { [] }, + isa => "ArrayRef", + is => "ro", + default => sub { [] }, ); has _queue => ( - isa => "ArrayRef", - is => "ro", - lazy => 1, - default => sub { - my $self = shift; - return [ $self->dir ], - }, + isa => "ArrayRef", + is => "ro", + lazy => 1, + default => sub { + my $self = shift; + return [ $self->dir ], + }, ); sub is_done { - my $self = shift; - return ( - @{ $self->_stack } == 0 - and - @{ $self->_queue } == 0 - ); + my $self = shift; + return ( + @{ $self->_stack } == 0 + and + @{ $self->_queue } == 0 + ); } sub next { - my $self = shift; + my $self = shift; - my $queue = $self->_queue; - my $stack = $self->_stack; + my $queue = $self->_queue; + my $stack = $self->_stack; - my $depth_first = $self->depth_first; - my $only_files = $self->only_files; - my $chunk_size = $self->chunk_size; + my $depth_first = $self->depth_first; + my $only_files = $self->only_files; + my $chunk_size = $self->chunk_size; - my @ret; + my @ret; - { - outer: while ( @$stack ) { - my $frame = $stack->[-1]; + { + outer: while ( @$stack ) { + my $frame = $stack->[-1]; - my ( $dh, $parent ) = @$frame; + my ( $dh, $parent ) = @$frame; - while ( defined(my $entry = $dh->read) ) { - next if $entry eq '.' || $entry eq '..'; + while ( defined(my $entry = $dh->read) ) { + next if $entry eq '.' || $entry eq '..'; - my $path = $parent->file($entry); + my $path = $parent->file($entry); - if ( -d $path ) { - my $dir = $parent->subdir($entry); + if ( -d $path ) { + my $dir = $parent->subdir($entry); - if ( $depth_first ) { - unshift @$queue, $dir; - } else { - push @$queue, $dir; - } + if ( $depth_first ) { + unshift @$queue, $dir; + } else { + push @$queue, $dir; + } - last outer; - } else { - push @ret, $path; - return \@ret if @ret >= $chunk_size; - } - } + last outer; + } else { + push @ret, $path; + return \@ret if @ret >= $chunk_size; + } + } - # we're done reading this dir - pop @$stack; - } + # we're done reading this dir + pop @$stack; + } - if ( @$queue ) { - my $dir = shift @$queue; - my $dh = $dir->open || croak("Can't open directory $dir: $!"); + if ( @$queue ) { + my $dir = shift @$queue; + my $dh = $dir->open || croak("Can't open directory $dir: $!"); - if ( $depth_first ) { - push @$stack, [ $dh, $dir ]; - } else { - unshift @$stack, [ $dh, $dir ]; - } + if ( $depth_first ) { + push @$stack, [ $dh, $dir ]; + } else { + unshift @$stack, [ $dh, $dir ]; + } - unless ( $only_files ) { - push @ret, $dir; - return \@ret if @ret >= $chunk_size; - } + unless ( $only_files ) { + push @ret, $dir; + return \@ret if @ret >= $chunk_size; + } - redo; - } - } + redo; + } + } - return unless @ret; - return \@ret; + return unless @ret; + return \@ret; } __PACKAGE__->meta->make_immutable; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Path::Class - L traversal =head1 SYNOPSIS - use Data::Stream::Bulk::Path::Class; + use Data::Stream::Bulk::Path::Class; - my $dir = Data::Stream::Bulk::Path::Class->new( - dir => Path::Class::Dir->new( ... ), - ); + my $dir = Data::Stream::Bulk::Path::Class->new( + dir => Path::Class::Dir->new( ... ), + ); =head1 DESCRIPTION @@ -155,37 +163,39 @@ =head1 ATTRIBUTES -=over 4 - -=item chunk_size +=head2 chunk_size Defaults to 250. -=item depth_first +=head2 depth_first Chooses between depth first and breadth first traversal order. -=item only_files +=head2 only_files If true only L items will be returned in the output streams (no directories). -=back - =head1 METHODS -=over 4 - -=item is_done +=head2 is_done Returns true when no more files are left to iterate. -=item next +=head2 next Returns the next chunk of L objects -=back +=head1 AUTHOR -=cut +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Util.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Util.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk/Util.pm 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk/Util.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,6 +1,11 @@ -#!/usr/bin/perl - package Data::Stream::Bulk::Util; +BEGIN { + $Data::Stream::Bulk::Util::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::Util::VERSION = '0.08'; +} +# ABSTRACT: Utility functions for L use strict; use warnings; @@ -13,7 +18,7 @@ use namespace::clean; use Sub::Exporter -setup => { - exports => [qw(nil bulk cat filter unique)], + exports => [qw(nil bulk cat filter unique)], }; # use constant nil => Data::Stream::Bulk::Nil->new; @@ -24,36 +29,38 @@ sub cat (@) { return @_ ? shift->cat(@_) : nil } sub filter (&$) { - my ( $filter, $stream ) = @_; - $stream->filter($filter); + my ( $filter, $stream ) = @_; + $stream->filter($filter); } sub unique ($) { - my %seen; - shift->filter(sub { [ grep { !$seen{ref($_) ? refaddr($_) : $_}++ } @$_ ] }); # FIXME Hash::Util::FieldHash::Compat::id()? + my %seen; + shift->filter(sub { [ grep { !$seen{ref($_) ? refaddr($_) : $_}++ } @$_ ] }); # FIXME Hash::Util::FieldHash::Compat::id()? } -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk::Util - Utility functions for L =head1 SYNOPSIS - use Data::Stream::Bulk::Util qw(array); + use Data::Stream::Bulk::Util qw(array); - use namespace::clean; + use namespace::clean; - # Wrap a list in L - return bulk(qw(foo bar gorch baz)); + # Wrap a list in L + return bulk(qw(foo bar gorch baz)); - # return an empty resultset - return nil(); + # return an empty resultset + return nil(); =head1 DESCRIPTION @@ -64,29 +71,27 @@ L is used to create the C routine, and all of its aliasing/currying goodness is of course supported. -=over 4 - -=item nil +=head2 nil Creates a new L object. Takes no arguments. -=item bulk @items +=head2 bulk @items Creates a new L wrapping C<@items>. -=item cat @streams +=head2 cat @streams Concatenate several streams together. Returns C if no arguments are provided. -=item filter { ... } $stream +=head2 filter { ... } $stream Calls C on $stream with the provided filter. -=item unique $stream +=head2 unique $stream Filter the stream to remove duplicates. @@ -97,7 +102,16 @@ References are keyed by their refaddr (see L). -=back +=head1 AUTHOR + +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut diff -Nru libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk.pm libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk.pm --- libdata-stream-bulk-perl-0.07/lib/Data/Stream/Bulk.pm 2009-07-11 07:56:32.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/lib/Data/Stream/Bulk.pm 2010-08-24 11:40:39.000000000 +0000 @@ -1,68 +1,72 @@ -#!/usr/bin/perl - package Data::Stream::Bulk; +BEGIN { + $Data::Stream::Bulk::AUTHORITY = 'cpan:NUFFIN'; +} +BEGIN { + $Data::Stream::Bulk::VERSION = '0.08'; +} +# ABSTRACT: N at a time iteration API + use Moose::Role; use namespace::clean -except => 'meta'; -our $VERSION = "0.07"; - requires qw(next is_done); sub items { - my $self = shift; + my $self = shift; - if ( my $a = $self->next ) { - return @$a; - } else { - return (); - } + if ( my $a = $self->next ) { + return @$a; + } else { + return (); + } } sub all { - my $self = shift; + my $self = shift; - my @ret; + my @ret; - while ( my $next = $self->next ) { - push @ret, @$next; - } + while ( my $next = $self->next ) { + push @ret, @$next; + } - return @ret; + return @ret; } sub cat { - my ( $self, @streams ) = @_; + my ( $self, @streams ) = @_; - return $self unless @streams; + return $self unless @streams; - my @cat = $self->list_cat(@streams); + my @cat = $self->list_cat(@streams); - unless ( @cat ) { - return Data::Stream::Bulk::Nil->new; - } elsif ( @cat == 1 ) { - return $cat[0]; - } else { - return Data::Stream::Bulk::Cat->new( - streams => \@cat, - ); - } + unless ( @cat ) { + return Data::Stream::Bulk::Nil->new; + } elsif ( @cat == 1 ) { + return $cat[0]; + } else { + return Data::Stream::Bulk::Cat->new( + streams => \@cat, + ); + } } sub list_cat { - my ( $self, $head, @tail ) = @_; + my ( $self, $head, @tail ) = @_; - return $self unless $head; - return ( $self, $head->list_cat(@tail) ); + return $self unless $head; + return ( $self, $head->list_cat(@tail) ); } sub filter { - my ( $self, $filter ) = @_; + my ( $self, $filter ) = @_; - return Data::Stream::Bulk::Filter->new( - filter => $filter, - stream => $self, - ); + return Data::Stream::Bulk::Filter->new( + filter => $filter, + stream => $self, + ); } sub loaded { 0 } @@ -72,34 +76,36 @@ require Data::Stream::Bulk::Nil; require Data::Stream::Bulk::Filter; -__PACKAGE__ +__PACKAGE__; -__END__ +__END__ =pod +=encoding utf-8 + =head1 NAME Data::Stream::Bulk - N at a time iteration API =head1 SYNOPSIS - # get a bulk stream from somewere - my $s = Data::Stream::Bulk::Foo->new( ... ); + # get a bulk stream from somewere + my $s = Data::Stream::Bulk::Foo->new( ... ); - # can be used like this: - until ( $s->is_done ) { - foreach my $item ( $s->items ) { - process($item); - } - } - - # or like this: - while( my $block = $s->next ) { - foreach my $item ( @$block ) { - process($item); - } - } + # can be used like this: + until ( $s->is_done ) { + foreach my $item ( $s->items ) { + process($item); + } + } + + # or like this: + while( my $block = $s->next ) { + foreach my $item ( @$block ) { + process($item); + } + } =head1 DESCRIPTION @@ -266,20 +272,16 @@ =back -=head1 VERSION CONTROL - -This module is maintained using git. You can get the latest version from -L. - =head1 AUTHOR -Yuval Kogman Enothingmuch@woobling.orgE +Yuval Kogman + +=head1 COPYRIGHT AND LICENSE -=head1 COPYRIGHT +This software is copyright (c) 2010 by Yuval Kogman. - Copyright (c) 2008 Yuval Kogman. All rights reserved - This program is free software; you can redistribute - it and/or modify it under the same terms as Perl itself. +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut diff -Nru libdata-stream-bulk-perl-0.07/LICENSE libdata-stream-bulk-perl-0.08/LICENSE --- libdata-stream-bulk-perl-0.07/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/LICENSE 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,377 @@ +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +Terms of the Perl programming language system itself + +a) the GNU General Public License as published by the Free + Software Foundation; either version 1, or (at your option) any + later version, or +b) the "Artistic License" + +--- The GNU General Public License, Version 1, February 1989 --- + +This software is Copyright (c) 2010 by Yuval Kogman. + +This is free software, licensed under: + + The GNU General Public License, Version 1, February 1989 + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + + +--- The Artistic License 1.0 --- + +This software is Copyright (c) 2010 by Yuval Kogman. + +This is free software, licensed under: + + The Artistic License 1.0 + +The Artistic License + +Preamble + +The intent of this document is to state the conditions under which a Package +may be copied, such that the Copyright Holder maintains some semblance of +artistic control over the development of the package, while giving the users of +the package the right to use and distribute the Package in a more-or-less +customary fashion, plus the right to make reasonable modifications. + +Definitions: + + - "Package" refers to the collection of files distributed by the Copyright + Holder, and derivatives of that collection of files created through + textual modification. + - "Standard Version" refers to such a Package if it has not been modified, + or has been modified in accordance with the wishes of the Copyright + Holder. + - "Copyright Holder" is whoever is named in the copyright or copyrights for + the package. + - "You" is you, if you're thinking about copying or distributing this Package. + - "Reasonable copying fee" is whatever you can justify on the basis of media + cost, duplication charges, time of people involved, and so on. (You will + not be required to justify it to the Copyright Holder, but only to the + computing community at large as a market that must bear the fee.) + - "Freely Available" means that no fee is charged for the item itself, though + there may be fees involved in handling the item. It also means that + recipients of the item may redistribute it under the same conditions they + received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications derived +from the Public Domain or from the Copyright Holder. A Package modified in such +a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided that +you insert a prominent notice in each changed file stating how and when you +changed that file, and provided that you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or an + equivalent medium, or placing the modifications on a major archive site + such as ftp.uu.net, or by allowing the Copyright Holder to include your + modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict with + standard executables, which must also be provided, and provide a separate + manual page for each non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or executable +form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where to + get the Standard Version. + + b) accompany the distribution with the machine-readable source of the Package + with your modifications. + + c) accompany any non-standard executables with their corresponding Standard + Version executables, giving the non-standard executables non-standard + names, and clearly documenting the differences in manual pages (or + equivalent), together with instructions on where to get the Standard + Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this Package. You +may not charge a fee for this Package itself. However, you may distribute this +Package in aggregate with other (possibly commercial) programs as part of a +larger (possibly commercial) software distribution provided that you do not +advertise this Package as a product of your own. + +6. The scripts and library files supplied as input to or produced as output +from the programs of this Package do not automatically fall under the copyright +of this Package, but belong to whomever generated them, and may be sold +commercially, and may be aggregated with this Package. + +7. C or perl subroutines supplied by you and linked into this Package shall not +be considered part of this Package. + +8. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End + diff -Nru libdata-stream-bulk-perl-0.07/Makefile.PL libdata-stream-bulk-perl-0.08/Makefile.PL --- libdata-stream-bulk-perl-0.07/Makefile.PL 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/Makefile.PL 2010-08-24 11:40:39.000000000 +0000 @@ -1,20 +1,55 @@ -#!/usr/bin/perl -w use strict; +use warnings; -use ExtUtils::MakeMaker; -WriteMakefile( - NAME => 'Data::Stream::Bulk', - VERSION_FROM => 'lib/Data/Stream/Bulk.pm', - INSTALLDIRS => 'site', - SIGN => 1, - PL_FILES => { }, - PREREQ_PM => { - 'Test::use::ok' => 0, - 'Moose' => 0, - 'namespace::clean' => '0.08', - 'Sub::Exporter' => 0, - }, + +use ExtUtils::MakeMaker 6.31; + + + +my %WriteMakefileArgs = ( + 'ABSTRACT' => 'N at a time iteration API', + 'AUTHOR' => 'Yuval Kogman ', + 'BUILD_REQUIRES' => { + 'Test::use::ok' => '0' + }, + 'CONFIGURE_REQUIRES' => { + 'ExtUtils::MakeMaker' => '6.31' + }, + 'DISTNAME' => 'Data-Stream-Bulk', + 'EXE_FILES' => [], + 'LICENSE' => 'perl', + 'NAME' => 'Data::Stream::Bulk', + 'PREREQ_PM' => { + 'Moose' => '0', + 'Sub::Exporter' => '0', + 'namespace::clean' => '0' + }, + 'VERSION' => '0.08', + 'test' => { + 'TESTS' => 't/*.t' + } ); + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { + my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; + my $pp = $WriteMakefileArgs{PREREQ_PM}; + for my $mod ( keys %$br ) { + if ( exists $pp->{$mod} ) { + $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; + } + else { + $pp->{$mod} = $br->{$mod}; + } + } +} + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + +WriteMakefile(%WriteMakefileArgs); + + + diff -Nru libdata-stream-bulk-perl-0.07/MANIFEST libdata-stream-bulk-perl-0.08/MANIFEST --- libdata-stream-bulk-perl-0.07/MANIFEST 2009-07-11 07:58:23.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/MANIFEST 2010-08-24 11:40:39.000000000 +0000 @@ -1,5 +1,11 @@ -.gitignore Changes +LICENSE +MANIFEST +META.json +META.yml +Makefile.PL +README +dist.ini lib/Data/Stream/Bulk.pm lib/Data/Stream/Bulk/Array.pm lib/Data/Stream/Bulk/Callback.pm @@ -11,13 +17,11 @@ lib/Data/Stream/Bulk/Nil.pm lib/Data/Stream/Bulk/Path/Class.pm lib/Data/Stream/Bulk/Util.pm -Makefile.PL -MANIFEST This list of files -MANIFEST.SKIP t/basic.t t/dbi.t t/dbic.t t/path_class.t -t/pod.t -META.yml Module meta-data (added by MakeMaker) -SIGNATURE Public-key signature (added by MakeMaker) +t/release-eol.t +t/release-no-tabs.t +t/release-pod-coverage.t +t/release-pod-syntax.t diff -Nru libdata-stream-bulk-perl-0.07/MANIFEST.SKIP libdata-stream-bulk-perl-0.08/MANIFEST.SKIP --- libdata-stream-bulk-perl-0.07/MANIFEST.SKIP 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/MANIFEST.SKIP 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -# Avoid version control files. -\bRCS\b -\bCVS\b -\bSCCS\b -,v$ -\B\.svn\b -\B\.git\b -\b_darcs\b - -# Avoid Makemaker generated and utility files. -\bMANIFEST\.bak -\bMakefile$ -\bblib/ -\bMakeMaker-\d -\bpm_to_blib\.ts$ -\bpm_to_blib$ -\bblibdirs\.ts$ # 6.18 through 6.25 generated this - -# Avoid Module::Build generated and utility files. -\bBuild$ -\b_build/ - -# Avoid temp and backup files. -~$ -\.old$ -\#$ -\b\.# -\.bak$ - -# Avoid Devel::Cover files. -\bcover_db\b - -### DEFAULT MANIFEST.SKIP ENDS HERE #### - -\.DS_Store$ -\.sw.$ -(\w+-)*(\w+)-\d\.\d+(?:\.tar\.gz)?$ - -\.t\.log$ - -\.prove$ - -# XS shit -\.(?:bs|c|o)$ diff -Nru libdata-stream-bulk-perl-0.07/META.json libdata-stream-bulk-perl-0.08/META.json --- libdata-stream-bulk-perl-0.07/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/META.json 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,224 @@ +{ + "abstract" : "N at a time iteration API", + "author" : [ + "Yuval Kogman " + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.102160", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Data-Stream-Bulk", + "prereqs" : { + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "6.31" + } + }, + "runtime" : { + "requires" : { + "Moose" : 0, + "Sub::Exporter" : 0, + "namespace::clean" : 0 + } + }, + "test" : { + "requires" : { + "Test::use::ok" : 0 + } + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "mailto" : "bug-Data-Stream-Bulk@rt.cpan.org", + "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Data-Stream-Bulk" + }, + "homepage" : "http://search.cpan.org/dist/Data-Stream-Bulk", + "repository" : { + "type" : "git", + "url" : "git://github.com/nothingmuch/data-stream-bulk.git", + "web" : "http://github.com/nothingmuch/data-stream-bulk" + } + }, + "version" : "0.08", + "x_Dist_Zilla" : { + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::GatherDir", + "name" : "@FLORA/@Basic/GatherDir", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "@FLORA/@Basic/PruneCruft", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::ManifestSkip", + "name" : "@FLORA/@Basic/ManifestSkip", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::MetaYAML", + "name" : "@FLORA/@Basic/MetaYAML", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::License", + "name" : "@FLORA/@Basic/License", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::Readme", + "name" : "@FLORA/@Basic/Readme", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::ExtraTests", + "name" : "@FLORA/@Basic/ExtraTests", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::ExecDir", + "name" : "@FLORA/@Basic/ExecDir", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::ShareDir", + "name" : "@FLORA/@Basic/ShareDir", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::MakeMaker", + "name" : "@FLORA/@Basic/MakeMaker", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::Manifest", + "name" : "@FLORA/@Basic/Manifest", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::TestRelease", + "name" : "@FLORA/@Basic/TestRelease", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::ConfirmRelease", + "name" : "@FLORA/@Basic/ConfirmRelease", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::UploadToCPAN", + "name" : "@FLORA/@Basic/UploadToCPAN", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "@FLORA/MetaConfig", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "@FLORA/MetaJSON", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::PkgVersion", + "name" : "@FLORA/PkgVersion", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::PodSyntaxTests", + "name" : "@FLORA/PodSyntaxTests", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::NoTabsTests", + "name" : "@FLORA/NoTabsTests", + "version" : "0.01" + }, + { + "class" : "Dist::Zilla::Plugin::PodCoverageTests", + "name" : "@FLORA/PodCoverageTests", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::MetaResources", + "name" : "@FLORA/MetaResources", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::Authority", + "name" : "@FLORA/Authority", + "version" : "1.000" + }, + { + "class" : "Dist::Zilla::Plugin::EOLTests", + "name" : "@FLORA/EOLTests", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::PodWeaver", + "name" : "@FLORA/PodWeaver", + "version" : "3.101640" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "runtime", + "type" : "requires" + } + }, + "name" : "Prereqs", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "test", + "type" : "requires" + } + }, + "name" : "TestRequires", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "4.102340" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "4.102340" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : 0 + }, + "version" : "4.102340" + } + }, + "x_authority" : "cpan:NUFFIN" +} + diff -Nru libdata-stream-bulk-perl-0.07/META.yml libdata-stream-bulk-perl-0.08/META.yml --- libdata-stream-bulk-perl-0.07/META.yml 2009-07-11 07:58:23.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/META.yml 2010-08-24 11:40:39.000000000 +0000 @@ -1,24 +1,160 @@ ---- #YAML:1.0 -name: Data-Stream-Bulk -version: 0.07 -abstract: ~ -author: [] -license: unknown -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 +--- +abstract: 'N at a time iteration API' +author: + - 'Yuval Kogman ' build_requires: - ExtUtils::MakeMaker: 0 -requires: - Moose: 0 - namespace::clean: 0.08 - Sub::Exporter: 0 - Test::use::ok: 0 -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.52 + Test::use::ok: 0 +configure_requires: + ExtUtils::MakeMaker: 6.31 +dynamic_config: 0 +generated_by: 'Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.102160' +license: perl meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Data-Stream-Bulk +requires: + Moose: 0 + Sub::Exporter: 0 + namespace::clean: 0 +resources: + bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Data-Stream-Bulk + homepage: http://search.cpan.org/dist/Data-Stream-Bulk + repository: git://github.com/nothingmuch/data-stream-bulk.git +version: 0.08 +x_Dist_Zilla: + plugins: + - + class: Dist::Zilla::Plugin::GatherDir + name: '@FLORA/@Basic/GatherDir' + version: 4.102340 + - + class: Dist::Zilla::Plugin::PruneCruft + name: '@FLORA/@Basic/PruneCruft' + version: 4.102340 + - + class: Dist::Zilla::Plugin::ManifestSkip + name: '@FLORA/@Basic/ManifestSkip' + version: 4.102340 + - + class: Dist::Zilla::Plugin::MetaYAML + name: '@FLORA/@Basic/MetaYAML' + version: 4.102340 + - + class: Dist::Zilla::Plugin::License + name: '@FLORA/@Basic/License' + version: 4.102340 + - + class: Dist::Zilla::Plugin::Readme + name: '@FLORA/@Basic/Readme' + version: 4.102340 + - + class: Dist::Zilla::Plugin::ExtraTests + name: '@FLORA/@Basic/ExtraTests' + version: 4.102340 + - + class: Dist::Zilla::Plugin::ExecDir + name: '@FLORA/@Basic/ExecDir' + version: 4.102340 + - + class: Dist::Zilla::Plugin::ShareDir + name: '@FLORA/@Basic/ShareDir' + version: 4.102340 + - + class: Dist::Zilla::Plugin::MakeMaker + name: '@FLORA/@Basic/MakeMaker' + version: 4.102340 + - + class: Dist::Zilla::Plugin::Manifest + name: '@FLORA/@Basic/Manifest' + version: 4.102340 + - + class: Dist::Zilla::Plugin::TestRelease + name: '@FLORA/@Basic/TestRelease' + version: 4.102340 + - + class: Dist::Zilla::Plugin::ConfirmRelease + name: '@FLORA/@Basic/ConfirmRelease' + version: 4.102340 + - + class: Dist::Zilla::Plugin::UploadToCPAN + name: '@FLORA/@Basic/UploadToCPAN' + version: 4.102340 + - + class: Dist::Zilla::Plugin::MetaConfig + name: '@FLORA/MetaConfig' + version: 4.102340 + - + class: Dist::Zilla::Plugin::MetaJSON + name: '@FLORA/MetaJSON' + version: 4.102340 + - + class: Dist::Zilla::Plugin::PkgVersion + name: '@FLORA/PkgVersion' + version: 4.102340 + - + class: Dist::Zilla::Plugin::PodSyntaxTests + name: '@FLORA/PodSyntaxTests' + version: 4.102340 + - + class: Dist::Zilla::Plugin::NoTabsTests + name: '@FLORA/NoTabsTests' + version: 0.01 + - + class: Dist::Zilla::Plugin::PodCoverageTests + name: '@FLORA/PodCoverageTests' + version: 4.102340 + - + class: Dist::Zilla::Plugin::MetaResources + name: '@FLORA/MetaResources' + version: 4.102340 + - + class: Dist::Zilla::Plugin::Authority + name: '@FLORA/Authority' + version: 1.000 + - + class: Dist::Zilla::Plugin::EOLTests + name: '@FLORA/EOLTests' + version: 0.02 + - + class: Dist::Zilla::Plugin::PodWeaver + name: '@FLORA/PodWeaver' + version: 3.101640 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: runtime + type: requires + name: Prereqs + version: 4.102340 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: test + type: requires + name: TestRequires + version: 4.102340 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':InstallModules' + version: 4.102340 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':TestFiles' + version: 4.102340 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ExecFiles' + version: 4.102340 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ShareFiles' + version: 4.102340 + zilla: + class: Dist::Zilla::Dist::Builder + config: + is_trial: 0 + version: 4.102340 +x_authority: cpan:NUFFIN diff -Nru libdata-stream-bulk-perl-0.07/README libdata-stream-bulk-perl-0.08/README --- libdata-stream-bulk-perl-0.07/README 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/README 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,13 @@ + + +This archive contains the distribution Data-Stream-Bulk, +version 0.08: + + N at a time iteration API + +This software is copyright (c) 2010 by Yuval Kogman. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + + diff -Nru libdata-stream-bulk-perl-0.07/SIGNATURE libdata-stream-bulk-perl-0.08/SIGNATURE --- libdata-stream-bulk-perl-0.07/SIGNATURE 2009-07-11 07:58:25.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/SIGNATURE 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.55. - -To verify the content in this distribution, first make sure you have -Module::Signature installed, then type: - - % cpansign -v - -It will check each file's integrity, as well as the signature's -validity. If "==> Signature verified OK! <==" is not displayed, -the distribution may already have been compromised, and you should -not run its Makefile.PL or Build.PL. - ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -SHA1 968be537dae8666f5fec5eaa357c82a8d8a92227 .gitignore -SHA1 754971a95cb30fad014d5a6bcfffef2a4e3efa41 Changes -SHA1 76f70ddaca5561a7a0923614b9a07a06471d33ec MANIFEST -SHA1 190e9058eb9c6446a1a3f3ddf15b082f1ecde152 MANIFEST.SKIP -SHA1 1b17c3a67678912790e6f0c7e4b80b8eee924738 META.yml -SHA1 bcf7bb00b1610830e122fd7fcdb37659e9471525 Makefile.PL -SHA1 8480c632da6ef49cd60ffaa2443936c7f257c506 lib/Data/Stream/Bulk.pm -SHA1 b0f51f4b50a74f9480ca0bada1cfa11413766c78 lib/Data/Stream/Bulk/Array.pm -SHA1 0e0cb58822476728658795ea8d94f58d39943165 lib/Data/Stream/Bulk/Callback.pm -SHA1 7caeded7484ca7779fc72344b68e8bb408c85b5f lib/Data/Stream/Bulk/Cat.pm -SHA1 89da1bca1469ad491c7a584512f8cafeca3044da lib/Data/Stream/Bulk/DBI.pm -SHA1 4bfe0943b0251c46617c84b68523539ce4b5696e lib/Data/Stream/Bulk/DBIC.pm -SHA1 39809a155d78521c1283e8838f36d9f15d8ed1f2 lib/Data/Stream/Bulk/DoneFlag.pm -SHA1 8f3dac3f2a1293be7fb1161e77dfcd79c731fe81 lib/Data/Stream/Bulk/Filter.pm -SHA1 a16b1943219e2f5ef2123e5a4e4e67a817391f90 lib/Data/Stream/Bulk/Nil.pm -SHA1 237ecd02c5584ef7d30a829fdf3eea5edd43b268 lib/Data/Stream/Bulk/Path/Class.pm -SHA1 62094fe2f848b94c092b4939dfb1c013f237705a lib/Data/Stream/Bulk/Util.pm -SHA1 87e0dfa3b292f7b5c739f6e044ac241ce04db76b t/basic.t -SHA1 0dbf4f10ce6c5fa53455985c4fdcadf63f227554 t/dbi.t -SHA1 dc026efe15a57e09708497c8c3d5369723406a21 t/dbic.t -SHA1 939dff86807cf7a80484e6ae9d247c241d9d3bcf t/path_class.t -SHA1 9972dd330898cf4f957d680bcd9ff1845b356bc5 t/pod.t ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.7 (Darwin) - -iD8DBQFKWEYfVCwRwOvSdBgRAtNFAKCwa/3HcYA7MoQTZTKkDVS4VF6d4ACgoCmH -rp7yjg40VBz6pZluTMFAYSA= -=NI+c ------END PGP SIGNATURE----- diff -Nru libdata-stream-bulk-perl-0.07/t/basic.t libdata-stream-bulk-perl-0.08/t/basic.t --- libdata-stream-bulk-perl-0.07/t/basic.t 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/basic.t 2010-08-24 11:40:39.000000000 +0000 @@ -11,233 +11,233 @@ use ok 'Data::Stream::Bulk::Util' => qw(bulk nil cat filter unique); { - my $d = Data::Stream::Bulk::Nil->new; + my $d = Data::Stream::Bulk::Nil->new; - ok( $d->is_done, "Nil is always done" ); - ok( !$d->next, "no next block" ); + ok( $d->is_done, "Nil is always done" ); + ok( !$d->next, "no next block" ); - isa_ok( nil, "Data::Stream::Bulk::Nil", "nil() helper" ); + isa_ok( nil, "Data::Stream::Bulk::Nil", "nil() helper" ); - ok( nil->loaded, "nil is realized" ); + ok( nil->loaded, "nil is realized" ); - isa_ok( bulk(), "Data::Stream::Bulk::Nil", "bulk() helper with no items" ); + isa_ok( bulk(), "Data::Stream::Bulk::Nil", "bulk() helper with no items" ); - isa_ok( nil->cat(nil), "Data::Stream::Bulk::Nil", "cating nil with nil results in nil" ); + isa_ok( nil->cat(nil), "Data::Stream::Bulk::Nil", "cating nil with nil results in nil" ); - isa_ok( cat(), "Data::Stream::Bulk::Nil", "cat with no args returns nil" ); + isa_ok( cat(), "Data::Stream::Bulk::Nil", "cat with no args returns nil" ); - isa_ok( cat(nil), "Data::Stream::Bulk::Nil", "cat of nil is nil" ); - isa_ok( cat(nil, nil, nil, nil), "Data::Stream::Bulk::Nil", "cat of several nil is nil" ); + isa_ok( cat(nil), "Data::Stream::Bulk::Nil", "cat of nil is nil" ); + isa_ok( cat(nil, nil, nil, nil), "Data::Stream::Bulk::Nil", "cat of several nil is nil" ); - is_deeply( [ nil->items ], [], "no items" ); - is_deeply( [ nil->all ], [], "nothing at all" ); + is_deeply( [ nil->items ], [], "no items" ); + is_deeply( [ nil->all ], [], "nothing at all" ); - isa_ok( nil->filter(sub {[]}), "Data::Stream::Bulk::Nil" ); + isa_ok( nil->filter(sub {[]}), "Data::Stream::Bulk::Nil" ); } { - my @array = qw(foo bar gorch baz); + my @array = qw(foo bar gorch baz); - my $d = Data::Stream::Bulk::Array->new( array => \@array ); + my $d = Data::Stream::Bulk::Array->new( array => \@array ); - ok( $d->loaded, "array is realized" ); + ok( $d->loaded, "array is realized" ); - ok( !$d->is_done, "not done" ); + ok( !$d->is_done, "not done" ); - is_deeply( $d->next, \@array, "next" ); + is_deeply( $d->next, \@array, "next" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next block" ); + ok( !$d->next, "no next block" ); - is_deeply( bulk(@array)->next, \@array, "bulk() helper" ); + is_deeply( bulk(@array)->next, \@array, "bulk() helper" ); - isa_ok( nil->cat(bulk(@array)), "Data::Stream::Bulk::Array", "nil cat Array results in Array" ); + isa_ok( nil->cat(bulk(@array)), "Data::Stream::Bulk::Array", "nil cat Array results in Array" ); - my $cat = bulk(qw(foo bar))->cat(bulk(qw(gorch baz))); + my $cat = bulk(qw(foo bar))->cat(bulk(qw(gorch baz))); - isa_ok( $cat, "Data::Stream::Bulk::Array", "Array cat Array resuls in Array" ); + isa_ok( $cat, "Data::Stream::Bulk::Array", "Array cat Array resuls in Array" ); - is_deeply( $cat->next, \@array, "concatenated array into one block" ); + is_deeply( $cat->next, \@array, "concatenated array into one block" ); - is_deeply( [ cat(bulk(qw(foo bar)), bulk(qw(gorch baz)))->all ], \@array, "cat helper function" ); + is_deeply( [ cat(bulk(qw(foo bar)), bulk(qw(gorch baz)))->all ], \@array, "cat helper function" ); } { - my @array = qw(foo bar gorch baz); + my @array = qw(foo bar gorch baz); - my $d = Data::Stream::Bulk::Array->new( array => \@array ); + my $d = Data::Stream::Bulk::Array->new( array => \@array ); - ok( !$d->is_done, "not done" ); + ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], \@array, "items method" ); + is_deeply( [ $d->items ], \@array, "items method" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next block" ); + ok( !$d->next, "no next block" ); } { - my @array = qw(foo bar); + my @array = qw(foo bar); - my $cb = sub { @array && [ shift @array ] }; + my $cb = sub { @array && [ shift @array ] }; - my $d = Data::Stream::Bulk::Callback->new( callback => $cb ); + my $d = Data::Stream::Bulk::Callback->new( callback => $cb ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "foo" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "bar" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "foo" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "bar" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ ], "items method" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next" ); + ok( !$d->next, "no next" ); } { - my @copy = my @array = qw(foo bar gorch); + my @copy = my @array = qw(foo bar gorch); - my $cb = sub { @array && [ shift @array ] }; + my $cb = sub { @array && [ shift @array ] }; - my $d = Data::Stream::Bulk::Callback->new( callback => $cb ); + my $d = Data::Stream::Bulk::Callback->new( callback => $cb ); - ok( !$d->loaded, "callback is not realized" ); + ok( !$d->loaded, "callback is not realized" ); - is_deeply( [ $d->all ], \@copy, "all method" ); + is_deeply( [ $d->all ], \@copy, "all method" ); - ok( $d->is_done, "done" ); + ok( $d->is_done, "done" ); } { - my @array = qw(foo bar); + my @array = qw(foo bar); - my $cb = sub { @array && [ shift @array ] }; + my $cb = sub { @array && [ shift @array ] }; - my $d = Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(gorch baz))); + my $d = Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(gorch baz))); - isa_ok( $d, "Data::Stream::Bulk::Cat" ); + isa_ok( $d, "Data::Stream::Bulk::Cat" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "foo" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "bar" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(gorch baz) ], "reached array" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "foo" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "bar" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(gorch baz) ], "reached array" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ ], "items method" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next" ); + ok( !$d->next, "no next" ); } { - my @array = qw(foo bar); - my $cb = sub { @array && [ shift @array ] }; + my @array = qw(foo bar); + my $cb = sub { @array && [ shift @array ] }; - my $d = nil->cat(bulk(qw(gorch baz))->cat(Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(oi))->cat(nil->cat(bulk("vey"))))->cat(nil))->cat(nil))->cat(nil)->cat(Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(last)))); + my $d = nil->cat(bulk(qw(gorch baz))->cat(Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(oi))->cat(nil->cat(bulk("vey"))))->cat(nil))->cat(nil))->cat(nil)->cat(Data::Stream::Bulk::Callback->new( callback => $cb )->cat(bulk(qw(last)))); - isa_ok( $d, "Data::Stream::Bulk::Cat" ); + isa_ok( $d, "Data::Stream::Bulk::Cat" ); - ok( !$d->loaded, "concatenation is not realized" ); + ok( !$d->loaded, "concatenation is not realized" ); - is_deeply( - [ map { ref } @{ $d->streams } ], - [ - "Data::Stream::Bulk::Array", # qw(gorch baz) - "Data::Stream::Bulk::Callback", # first cb - "Data::Stream::Bulk::Array", # "oi" cat "vey" - "Data::Stream::Bulk::Callback", # second CB - "Data::Stream::Bulk::Array", # "last" - ], - "list_cat simplified concatenation", - ); + is_deeply( + [ map { ref } @{ $d->streams } ], + [ + "Data::Stream::Bulk::Array", # qw(gorch baz) + "Data::Stream::Bulk::Callback", # first cb + "Data::Stream::Bulk::Array", # "oi" cat "vey" + "Data::Stream::Bulk::Callback", # second CB + "Data::Stream::Bulk::Array", # "last" + ], + "list_cat simplified concatenation", + ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(gorch baz) ], "array block" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "foo" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "bar" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(oi vey) ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "last" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(gorch baz) ], "array block" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "foo" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "bar" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(oi vey) ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "last" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ ], "items method" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next" ); + ok( !$d->next, "no next" ); - is_deeply( - [ map { ref } @{ $d->streams } ], - [ ], - "no streams in concatenated", - ); + is_deeply( + [ map { ref } @{ $d->streams } ], + [ ], + "no streams in concatenated", + ); } { - my $d = filter { [ grep { /o/ } @$_ ] } bulk(qw(foo bar gorch baz)); + my $d = filter { [ grep { /o/ } @$_ ] } bulk(qw(foo bar gorch baz)); - isa_ok( $d, "Data::Stream::Bulk::Array" ); + isa_ok( $d, "Data::Stream::Bulk::Array" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(foo gorch) ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(foo gorch) ], "items method" ); - ok( $d->is_done, "done" ); + ok( $d->is_done, "done" ); - ok( !$d->next, "no next" ); + ok( !$d->next, "no next" ); } { - my @array = ( [qw(foo bar), "", ], [qw(gorch baz)] ); + my @array = ( [qw(foo bar), "", ], [qw(gorch baz)] ); - my $cb = sub { shift @array }; + my $cb = sub { shift @array }; - my $d = Data::Stream::Bulk::Callback->new( callback => $cb )->filter(sub { - return [ grep { length } @$_ ]; - })->filter(sub{ - return [ grep { /o/ } @$_ ]; - }); + my $d = Data::Stream::Bulk::Callback->new( callback => $cb )->filter(sub { + return [ grep { length } @$_ ]; + })->filter(sub{ + return [ grep { /o/ } @$_ ]; + }); - isa_ok( $d, "Data::Stream::Bulk::Filter" ); + isa_ok( $d, "Data::Stream::Bulk::Filter" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "foo" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ "gorch" ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "foo" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ "gorch" ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ ], "items method" ); - ok( $d->is_done, "now it's done" ); + ok( $d->is_done, "now it's done" ); - ok( !$d->next, "no next" ); + ok( !$d->next, "no next" ); } { - my @array = ( [qw(foo bar bar)], [qw(gorch foo baz)] ); + my @array = ( [qw(foo bar bar)], [qw(gorch foo baz)] ); - my $cb = sub { shift @array }; + my $cb = sub { shift @array }; - my $d = unique(Data::Stream::Bulk::Callback->new( callback => $cb )); + my $d = unique(Data::Stream::Bulk::Callback->new( callback => $cb )); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(foo bar) ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ qw(gorch baz) ], "items method" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [ ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(foo bar) ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ qw(gorch baz) ], "items method" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [ ], "items method" ); } { - my ( $foo, $bar, $gorch ) = ( [], {}, "gorch" ); - my $a = unique(bulk($foo, $bar, $foo, $foo, $gorch, $bar)); + my ( $foo, $bar, $gorch ) = ( [], {}, "gorch" ); + my $a = unique(bulk($foo, $bar, $foo, $foo, $gorch, $bar)); - isa_ok( $a, "Data::Stream::Bulk::Array", "unique on array returns array" ); + isa_ok( $a, "Data::Stream::Bulk::Array", "unique on array returns array" ); - is_deeply([ $a->all ], [ $foo, $bar, $gorch ], "unique with refs" ); + is_deeply([ $a->all ], [ $foo, $bar, $gorch ], "unique with refs" ); } diff -Nru libdata-stream-bulk-perl-0.07/t/dbic.t libdata-stream-bulk-perl-0.08/t/dbic.t --- libdata-stream-bulk-perl-0.07/t/dbic.t 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/dbic.t 2010-08-24 11:40:39.000000000 +0000 @@ -8,72 +8,72 @@ our $schema; BEGIN { - plan skip_all => $@ unless eval { - require DBIx::Class; - require DBI; - require DBD::SQLite; - require Test::TempDir; - Test::TempDir->import('temp_root'); - 1; - } + plan skip_all => $@ unless eval { + require DBIx::Class; + require DBI; + require DBD::SQLite; + require Test::TempDir; + Test::TempDir->import('temp_root'); + 1; + } } BEGIN { - plan skip_all => $@ unless eval { - { - package Schema::Foo; - use base qw(DBIx::Class); + plan skip_all => $@ unless eval { + { + package Schema::Foo; + use base qw(DBIx::Class); - __PACKAGE__->load_components(qw(Core)); + __PACKAGE__->load_components(qw(Core)); - __PACKAGE__->table("foo"); + __PACKAGE__->table("foo"); - __PACKAGE__->add_columns(qw(id name)); + __PACKAGE__->add_columns(qw(id name)); - __PACKAGE__->set_primary_key("id"); + __PACKAGE__->set_primary_key("id"); - package Schema; - use base qw(DBIx::Class::Schema); + package Schema; + use base qw(DBIx::Class::Schema); - __PACKAGE__->load_classes(qw(Foo)); + __PACKAGE__->load_classes(qw(Foo)); - 1; - } + 1; + } - my $file = temp_root()->file("db"); - $schema = Schema->connect("dbi:SQLite:dbname=$file", undef, undef, { RaiseError => 1 } ); - $schema->storage->dbh->do("create table foo ( id integer primary key, name varchar )"); - }; + my $file = temp_root()->file("db"); + $schema = Schema->connect("dbi:SQLite:dbname=$file", undef, undef, { RaiseError => 1 } ); + $schema->storage->dbh->do("create table foo ( id integer primary key, name varchar )"); + }; - plan 'no_plan'; + plan 'no_plan'; } use ok 'Data::Stream::Bulk::DBIC'; { - my $d = Data::Stream::Bulk::DBIC->new( resultset => $schema->resultset("Foo") ); + my $d = Data::Stream::Bulk::DBIC->new( resultset => $schema->resultset("Foo") ); - ok( !$d->is_done, "not done" ); + ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [], "no items" ); + is_deeply( [ $d->items ], [], "no items" ); - ok( $d->is_done, "now done" ); + ok( $d->is_done, "now done" ); } { - $schema->resultset("Foo")->populate([ - { name => "hello" }, - { name => "goodbye" }, - ]); - - my $d = Data::Stream::Bulk::DBIC->new( resultset => $schema->resultset("Foo") ); - - ok( !$d->is_done, "not done" ); - is_deeply( [ map { $_->name } $d->items ], [ "hello" ], "one item" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ map { $_->name } $d->items ], [ "goodbye" ], "one item" ); - ok( !$d->is_done, "not done" ); - is_deeply( [ $d->items ], [], "no items" ); + $schema->resultset("Foo")->populate([ + { name => "hello" }, + { name => "goodbye" }, + ]); + + my $d = Data::Stream::Bulk::DBIC->new( resultset => $schema->resultset("Foo") ); + + ok( !$d->is_done, "not done" ); + is_deeply( [ map { $_->name } $d->items ], [ "hello" ], "one item" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ map { $_->name } $d->items ], [ "goodbye" ], "one item" ); + ok( !$d->is_done, "not done" ); + is_deeply( [ $d->items ], [], "no items" ); - ok( $d->is_done, "now done" ); + ok( $d->is_done, "now done" ); } diff -Nru libdata-stream-bulk-perl-0.07/t/dbi.t libdata-stream-bulk-perl-0.08/t/dbi.t --- libdata-stream-bulk-perl-0.07/t/dbi.t 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/dbi.t 2010-08-24 11:40:39.000000000 +0000 @@ -8,73 +8,73 @@ our $dbh; BEGIN { - plan skip_all => $@ unless eval { - require DBI; - require DBD::Mock; - DBD::Mock->VERSION("1.37"); - $dbh = DBI->connect( 'DBI:Mock:', '', '' ) - || die "Cannot create handle: $DBI::errstr\n" - }; + plan skip_all => $@ unless eval { + require DBI; + require DBD::Mock; + DBD::Mock->VERSION("1.37"); + $dbh = DBI->connect( 'DBI:Mock:', '', '' ) + || die "Cannot create handle: $DBI::errstr\n" + }; - plan 'no_plan'; + plan 'no_plan'; } use ok 'Data::Stream::Bulk::DBI'; my @data = ( - [ qw(col1 col2 col3) ], - [ qw(foo bar gorch) ], - [ qw(zot oi lalala) ], - [ qw(those meddling kids) ], + [ qw(col1 col2 col3) ], + [ qw(foo bar gorch) ], + [ qw(zot oi lalala) ], + [ qw(those meddling kids) ], ); { - $dbh->{mock_add_resultset} = [ @data ]; + $dbh->{mock_add_resultset} = [ @data ]; - my $sth = $dbh->prepare("SELECT * FROM foo;"); + my $sth = $dbh->prepare("SELECT * FROM foo;"); - $sth->execute; + $sth->execute; - my $d = Data::Stream::Bulk::DBI->new( - sth => $sth, - max_rows => 2, - ); + my $d = Data::Stream::Bulk::DBI->new( + sth => $sth, + max_rows => 2, + ); - ok( !$d->is_done, "not yet done" ); + ok( !$d->is_done, "not yet done" ); - is_deeply( $d->next, [ @data[1,2] ], "two rows" ); + is_deeply( $d->next, [ @data[1,2] ], "two rows" ); - ok( !$d->is_done, "not yet done" ); + ok( !$d->is_done, "not yet done" ); - is_deeply( [ $d->items ], [ $data[3] ], "one more" ); + is_deeply( [ $d->items ], [ $data[3] ], "one more" ); - ok( !$d->is_done, "not yet done" ); + ok( !$d->is_done, "not yet done" ); - is_deeply( [ $d->items ], [ ], "no more" ); + is_deeply( [ $d->items ], [ ], "no more" ); - ok( $d->is_done, "now we're done" ); + ok( $d->is_done, "now we're done" ); } { - $dbh->{mock_add_resultset} = [ @data ]; + $dbh->{mock_add_resultset} = [ @data ]; - my $sth = $dbh->prepare("SELECT * FROM foo;"); + my $sth = $dbh->prepare("SELECT * FROM foo;"); - $sth->execute; + $sth->execute; - my $d = Data::Stream::Bulk::DBI->new( - sth => $sth, - max_rows => 1, - ); + my $d = Data::Stream::Bulk::DBI->new( + sth => $sth, + max_rows => 1, + ); - ok( !$d->is_done, "not yet done" ); + ok( !$d->is_done, "not yet done" ); - is_deeply( $d->next, [ $data[1] ], "one row" ); + is_deeply( $d->next, [ $data[1] ], "one row" ); - ok( !$d->is_done, "not yet done" ); + ok( !$d->is_done, "not yet done" ); - is_deeply( [ $d->all ], [ @data[2,3] ], "all remaining rows" ); + is_deeply( [ $d->all ], [ @data[2,3] ], "all remaining rows" ); - ok( $d->is_done, "now we're done" ); + ok( $d->is_done, "now we're done" ); } diff -Nru libdata-stream-bulk-perl-0.07/t/path_class.t libdata-stream-bulk-perl-0.08/t/path_class.t --- libdata-stream-bulk-perl-0.07/t/path_class.t 2009-01-10 00:10:52.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/path_class.t 2010-08-24 11:40:39.000000000 +0000 @@ -6,8 +6,8 @@ use Test::More; BEGIN { - plan skip_all => $@ unless eval { require Path::Class }; - plan 'no_plan'; + plan skip_all => $@ unless eval { require Path::Class }; + plan 'no_plan'; } use ok 'Data::Stream::Bulk::Path::Class'; @@ -18,97 +18,97 @@ foreach my $dir ( $dist->subdir("t"), $dist->subdir("lib"), $dist ) { - { - my $paths = Data::Stream::Bulk::Path::Class->new( - dir => $dir, - chunk_size => 2, - depth_first => 0, - ); - - my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); - - my @rec; - $dir->recurse( callback => sub { push @rec, "$_[0]" unless $_[0] =~ /tmp/ }, depthfirst => 0, preorder => 1 ); - - ok( !$_->is_done, "not done" ) for $paths, $strings; - - my @all = $strings->all; - - ok( $_->is_done, "done" ) for $paths, $strings; - - is_deeply( - [ sort @all ], - [ sort @rec ], - "breadth first traversal path set", - ); - - is_deeply( - \@all, - \@rec, - "breadth first traversal order", - ); - } - - { - my $paths = Data::Stream::Bulk::Path::Class->new( - dir => $dir, - chunk_size => 2, - depth_first => 1, - ); - - my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); - - my @rec; - $dir->recurse( callback => sub { push @rec, "$_[0]" unless $_[0] =~ /tmp/ }, depthfirst => 1, preorder => 1 ); - - ok( !$_->is_done, "not done" ) for $paths, $strings; - - my @all = $strings->all; - - ok( $_->is_done, "done" ) for $paths, $strings; - - is_deeply( - [ sort @all ], - [ sort @rec ], - "depth first traversal path set", - ); - - is_deeply( - \@all, - \@rec, - "depth first traversal order", - ); - } - - { - my $paths = Data::Stream::Bulk::Path::Class->new( - dir => $dir, - chunk_size => 2, - depth_first => 0, - only_files => 1, - ); - - my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); - - my @rec; - $dir->recurse( callback => sub { push @rec, "$_[0]" if $_[0] !~ /tmp/ and -f $_[0] }, depthfirst => 0, preorder => 1 ); - - ok( !$_->is_done, "not done" ) for $paths, $strings; - - my @all = $strings->all; - - ok( $_->is_done, "done" ) for $paths, $strings; - - is_deeply( - [ sort @all ], - [ sort @rec ], - "breadth first traversal path set", - ); - - is_deeply( - \@all, - \@rec, - "breadth first traversal order", - ); - } + { + my $paths = Data::Stream::Bulk::Path::Class->new( + dir => $dir, + chunk_size => 2, + depth_first => 0, + ); + + my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); + + my @rec; + $dir->recurse( callback => sub { push @rec, "$_[0]" unless $_[0] =~ /tmp/ }, depthfirst => 0, preorder => 1 ); + + ok( !$_->is_done, "not done" ) for $paths, $strings; + + my @all = $strings->all; + + ok( $_->is_done, "done" ) for $paths, $strings; + + is_deeply( + [ sort @all ], + [ sort @rec ], + "breadth first traversal path set", + ); + + is_deeply( + \@all, + \@rec, + "breadth first traversal order", + ); + } + + { + my $paths = Data::Stream::Bulk::Path::Class->new( + dir => $dir, + chunk_size => 2, + depth_first => 1, + ); + + my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); + + my @rec; + $dir->recurse( callback => sub { push @rec, "$_[0]" unless $_[0] =~ /tmp/ }, depthfirst => 1, preorder => 1 ); + + ok( !$_->is_done, "not done" ) for $paths, $strings; + + my @all = $strings->all; + + ok( $_->is_done, "done" ) for $paths, $strings; + + is_deeply( + [ sort @all ], + [ sort @rec ], + "depth first traversal path set", + ); + + is_deeply( + \@all, + \@rec, + "depth first traversal order", + ); + } + + { + my $paths = Data::Stream::Bulk::Path::Class->new( + dir => $dir, + chunk_size => 2, + depth_first => 0, + only_files => 1, + ); + + my $strings = $paths->filter(sub {[ grep { !/tmp/ } map { "$_" } @$_ ]}); + + my @rec; + $dir->recurse( callback => sub { push @rec, "$_[0]" if $_[0] !~ /tmp/ and -f $_[0] }, depthfirst => 0, preorder => 1 ); + + ok( !$_->is_done, "not done" ) for $paths, $strings; + + my @all = $strings->all; + + ok( $_->is_done, "done" ) for $paths, $strings; + + is_deeply( + [ sort @all ], + [ sort @rec ], + "breadth first traversal path set", + ); + + is_deeply( + \@all, + \@rec, + "breadth first traversal order", + ); + } } diff -Nru libdata-stream-bulk-perl-0.07/t/pod.t libdata-stream-bulk-perl-0.08/t/pod.t --- libdata-stream-bulk-perl-0.07/t/pod.t 2009-07-11 07:55:27.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/pod.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -use strict; -use warnings; -use Test::More; - -plan skip_all => 'set TEST_POD to enable this test' - unless $ENV{TEST_POD}; - -eval "use Test::Pod"; -plan skip_all => 'Test::Pod required for this test' - if $@; - -all_pod_files_ok(); diff -Nru libdata-stream-bulk-perl-0.07/t/release-eol.t libdata-stream-bulk-perl-0.08/t/release-eol.t --- libdata-stream-bulk-perl-0.07/t/release-eol.t 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/release-eol.t 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,16 @@ + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +use strict; +use warnings; +use Test::More; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => 1 }); diff -Nru libdata-stream-bulk-perl-0.07/t/release-no-tabs.t libdata-stream-bulk-perl-0.08/t/release-no-tabs.t --- libdata-stream-bulk-perl-0.07/t/release-no-tabs.t 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/release-no-tabs.t 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,16 @@ + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +use strict; +use warnings; +use Test::More; + +eval 'use Test::NoTabs'; +plan skip_all => 'Test::NoTabs required' if $@; + +all_perl_files_ok(); diff -Nru libdata-stream-bulk-perl-0.07/t/release-pod-coverage.t libdata-stream-bulk-perl-0.08/t/release-pod-coverage.t --- libdata-stream-bulk-perl-0.07/t/release-pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/release-pod-coverage.t 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,21 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + + +use Test::More; + +eval "use Test::Pod::Coverage 1.08"; +plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" + if $@; + +eval "use Pod::Coverage::TrustPod"; +plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" + if $@; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff -Nru libdata-stream-bulk-perl-0.07/t/release-pod-syntax.t libdata-stream-bulk-perl-0.08/t/release-pod-syntax.t --- libdata-stream-bulk-perl-0.07/t/release-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ libdata-stream-bulk-perl-0.08/t/release-pod-syntax.t 2010-08-24 11:40:39.000000000 +0000 @@ -0,0 +1,15 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +use Test::More; + +eval "use Test::Pod 1.41"; +plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; + +all_pod_files_ok();