Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tap::parser::multiplexer5.18(3pm) [mojave man page]

TAP::Parser::Multiplexer(3pm)				 Perl Programmers Reference Guide			     TAP::Parser::Multiplexer(3pm)

NAME
TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers VERSION
Version 3.26 SYNOPSIS
use TAP::Parser::Multiplexer; my $mux = TAP::Parser::Multiplexer->new; $mux->add( $parser1, $stash1 ); $mux->add( $parser2, $stash2 ); while ( my ( $parser, $stash, $result ) = $mux->next ) { # do stuff } DESCRIPTION
"TAP::Parser::Multiplexer" gathers input from multiple TAP::Parsers. Internally it calls select on the input file handles for those parsers to wait for one or more of them to have input available. See TAP::Harness for an example of its use. METHODS
Class Methods "new" my $mux = TAP::Parser::Multiplexer->new; Returns a new "TAP::Parser::Multiplexer" object. Instance Methods "add" $mux->add( $parser, $stash ); Add a TAP::Parser to the multiplexer. $stash is an optional opaque reference that will be returned from "next" along with the parser and the next result. "parsers" my $count = $mux->parsers; Returns the number of parsers. Parsers are removed from the multiplexer when their input is exhausted. "next" Return a result from the next available parser. Returns a list containing the parser from which the result came, the stash that corresponds with that parser and the result. my ( $parser, $stash, $result ) = $mux->next; If $result is undefined the corresponding parser has reached the end of its input (and will automatically be removed from the multiplexer). When all parsers are exhausted an empty list will be returned. if ( my ( $parser, $stash, $result ) = $mux->next ) { if ( ! defined $result ) { # End of this parser } else { # Process result } } else { # All parsers finished } See Also TAP::Parser TAP::Harness perl v5.18.2 2014-01-06 TAP::Parser::Multiplexer(3pm)

Check Out this Related Man Page

TAP::Parser::Iterator::Stream(3pm)			 Perl Programmers Reference Guide			TAP::Parser::Iterator::Stream(3pm)

NAME
TAP::Parser::Iterator::Stream - Internal TAP::Parser Iterator VERSION
Version 3.17 SYNOPSIS
# see TAP::Parser::IteratorFactory for preferred usage # to use directly: use TAP::Parser::Iterator::Stream; open( TEST, 'test.tap' ); my $it = TAP::Parser::Iterator::Stream->new(*TEST); my $line = $it->next; DESCRIPTION
This is a simple iterator wrapper for reading from filehandles, used by TAP::Parser. Unless you're subclassing, you probably won't need to use this module directly. METHODS
Class Methods "new" Create an iterator. Expects one argument containing a filehandle. Instance Methods "next" Iterate through it, of course. "next_raw" Iterate raw input without applying any fixes for quirky input syntax. "wait" Get the wait status for this iterator. Always returns zero. "exit" Get the exit status for this iterator. Always returns zero. ATTRIBUTION
Originally ripped off from Test::Harness. SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::Iterator, TAP::Parser::IteratorFactory, perl v5.12.1 2010-04-26 TAP::Parser::Iterator::Stream(3pm)
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using key words or symbols to determine parser

There are multiple conditions in which the user can input data. 1. > 2. del 3. ins 4. delins The user input is saved in a specific directory using the code below: Code: cd 'C:' C:/Users/cmccabe/Desktop/Python27/python.exe C:/Users/cmccabe/Desktop/Python27/run_batch_job.py... (12 Replies)
Discussion started by: cmccabe
12 Replies

2. Shell Programming and Scripting

Parser

Hi All, I am trying to create a parser to find out what cobol programs are being called by which JCL's. I need to search recursively until the main cobol program is found being called by a JCL. I tried to create a script but I am not able to generalize it. Can someone please help. ... (1 Reply)
Discussion started by: nua7
1 Replies