make Call command not return anything so _merge doesn't try and merge the row count
[dbsrgits/DBIx-Data-Store-old.git] / lib / Data / Perl / Stream / Array.pm
CommitLineData
65b76960 1package Data::Perl::Stream::Array;
2
3use Moose;
4use Method::Signatures::Simple;
5
6has _array => (is => 'rw', required => 1, init_arg => 'array');
7
8method BUILD { $self->_array([ @{$self->_array} ]) }
9
65b76960 10method next {
11 my $ary = $self->_array;
12 return unless @$ary;
13 return shift @$ary;
14}
15
9e6828e2 16method map ($map_func) {
17 ref($self)->new(array => [ map { $map_func->($_) } @{$self->_array} ]);
18}
19
4b4cd5bd 20__PACKAGE__->meta->make_immutable;
21
65b76960 221;