1 package TAP::Parser::Iterator::Stream;
4 use vars qw($VERSION @ISA);
6 use TAP::Parser::Iterator ();
8 @ISA = 'TAP::Parser::Iterator';
12 TAP::Parser::Iterator::Stream - Internal TAP::Parser Iterator
24 # see TAP::Parser::IteratorFactory for preferred usage
27 use TAP::Parser::Iterator::Stream;
28 open( TEST, 'test.tap' );
29 my $it = TAP::Parser::Iterator::Stream->new(\*TEST);
34 This is a simple iterator wrapper for reading from filehandles, used by
35 L<TAP::Parser>. Unless you're subclassing, you probably won't need to use
44 Create an iterator. Expects one argument containing a filehandle.
48 # new() implementation supplied by TAP::Object
51 my ( $self, $thing ) = @_;
56 =head2 Instance Methods
60 Iterate through it, of course.
64 Iterate raw input without applying any fixes for quirky input syntax.
68 Get the wait status for this iterator. Always returns zero.
72 Get the exit status for this iterator. Always returns zero.
76 sub wait { shift->exit }
77 sub exit { shift->{fh} ? () : 0 }
83 if ( defined( my $line = <$fh> ) ) {
95 close delete $self->{fh};
102 Originally ripped off from L<Test::Harness>.
108 L<TAP::Parser::Iterator>,
109 L<TAP::Parser::IteratorFactory>,