Lines Matching full:parser
1 package TAP::Parser::Multiplexer;
17 TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers
29 use TAP::Parser::Multiplexer;
31 my $mux = TAP::Parser::Multiplexer->new;
34 while ( my ( $parser, $stash, $result ) = $mux->next ) {
40 C<TAP::Parser::Multiplexer> gathers input from multiple TAP::Parsers.
52 my $mux = TAP::Parser::Multiplexer->new;
54 Returns a new C<TAP::Parser::Multiplexer> object.
74 $mux->add( $parser, $stash );
76 Add a TAP::Parser to the multiplexer. C<$stash> is an optional opaque
77 reference that will be returned from C<next> along with the parser and
83 my ( $self, $parser, $stash ) = @_;
85 if ( SELECT_OK && ( my @handles = $parser->get_select_handles ) ) {
93 $sel->add( [ $h, $parser, $stash, @filenos ] );
99 push @{ $self->{avid} }, [ $parser, $stash ];
128 my ( $parser, $stash ) = @{ $avid->[0] };
129 my $result = $parser->next;
131 return ( $parser, $stash, $result );
140 my ( $h, $parser, $stash, @handles ) = @{ shift @ready };
141 my $result = $parser->next;
152 return ( $parser, $stash, $result );
158 Return a result from the next available parser. Returns a list
159 containing the parser from which the result came, the stash that
160 corresponds with that parser and the result.
162 my ( $parser, $stash, $result ) = $mux->next;
164 If C<$result> is undefined the corresponding parser has reached the end
169 if ( my ( $parser, $stash, $result ) = $mux->next ) {
171 # End of this parser
190 L<TAP::Parser>