Manual Reference Pages  - TAP::Parser::Iterator (3)

NAME

TAP::Parser::Iterator - Internal TAP::Parser Iterator

CONTENTS

VERSION

Version 3.10

SYNOPSIS



  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.

DESCRIPTION

FOR INTERNAL USE ONLY!

This is a simple iterator wrapper for arrays and filehandles.

Class Methods

new



 my $iter = TAP::Parser::Iterator->new( $array_reference );
 my $iter = TAP::Parser::Iterator->new( $filehandle );



Create an iterator.

Instance Methods

next



 while ( my $item = $iter->next ) { ... }



Iterate through it, of course.

next_raw



 while ( my $item = $iter->next_raw ) { ... }



Iterate raw input without applying any fixes for quirky input syntax.

handle_unicode

If necessary switch the input stream to handle unicode. This only has any effect for I/O handle based streams.

get_select_handles

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.

Jump to page    or go to Top of page |  Section 3 |  Main Index.


perl v5.8.5 TAP::Parser::Iterator (3) 2008-02-18
Generated by manServer 1.07 from /usr/share/man/man3/TAP::Parser::Iterator.3pm using man macros.