Curtis "Ovid" Poe > TAPx-Parser-0.50_07 > TAPx::Parser::Iterator

Download:
TAPx-Parser-0.50_07.tar.gz

Dependencies

Annotate this POD

Module Version: 0.50_07   Source  

NAME ^

TAPx::Parser::Iterator - Internal TAPx::Parser Iterator

VERSION ^

Version 0.50_07

SYNOPSIS ^

  use TAPx::Parser::Iterator;
  my $it = TAPx::Parser::Iterator->new(\*TEST);
  my $it = TAPx::Parser::Iterator->new(\@array);

  my $line = $it->next;
  if ( $it->is_first ) { ... }
  if ( $it->is_last ) { ... }

Originally ripped off from Test::Harness.

DESCRIPTION ^

FOR INTERNAL USE ONLY!

This is a simple iterator wrapper for arrays and filehandles.

new()

Create an iterator.

next()

Iterate through it, of course.

next_raw()

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

is_first()

Returns true if on the first line. Must be called after next().

is_last()

Returns true if on or after the last line. Must be called after next().

pid

  my $pid = $source->pid;
  $source->pid($pid);

Getter/Setter for the pid of the process the filehandle reads from. Only makes sense when a filehandle is being used for the iterator.

syntax highlighting: