1 package TAP::Parser::Iterator::Array;
4 use TAP::Parser::Iterator ();
5 use vars qw($VERSION @ISA);
6 @ISA = 'TAP::Parser::Iterator';
10 TAP::Parser::Iterator::Array - Internal TAP::Parser Iterator
22 use TAP::Parser::Iterator::Array;
23 my $it = TAP::Parser::Iterator->new(\@array);
27 Originally ripped off from L<Test::Harness>.
31 B<FOR INTERNAL USE ONLY!>
33 This is a simple iterator wrapper for arrays.
41 =head2 Instance Methods
45 Iterate through it, of course.
49 Iterate raw input without applying any fixes for quirky input syntax.
53 Get the wait status for this iterator. For an array iterator this will always
58 Get the exit status for this iterator. For an array iterator this will always
64 my ( $class, $thing ) = @_;
73 sub wait { shift->exit }
77 return 0 if $self->{idx} >= @{ $self->{array} };
83 return $self->{array}->[ $self->{idx}++ ];