package Data::Perl::Stream::Array;

use Moose;
use Method::Signatures::Simple;

has _array => (is => 'rw', required => 1, init_arg => 'array');

method BUILD { $self->_array([ @{$self->_array} ]) }

use Devel::Dwarn;

method next {
  my $ary = $self->_array;
  return unless @$ary;
  return shift @$ary;
}

1;
