TAP::Parser::Iterator - Internal TAP::Parser Iterator
use TAP::Parser::Iterator; my $it = TAP::Parser::Iterator->new(\*TEST); my $it = TAP::Parser::Iterator->new(\@array);
my $line = $it->next;
Originally ripped off from Test::Harness.
This is a simple iterator wrapper for arrays and filehandles.
my $iter = TAP::Parser::Iterator->new( $array_reference ); my $iter = TAP::Parser::Iterator->new( $filehandle );
while ( my $item = $iter->next ) { ... }
Iterate through it, of course.
while ( my $item = $iter->next_raw ) { ... }
Iterate raw input without applying any fixes for quirky input syntax.
If necessary switch the input stream to handle unicode. This only has any effect for I/O handle based streams.
Return a list of filehandles that may be used upstream in a select() call to signal that this Iterator is ready. Iterators that are not handle based should return an empty list.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |