TAP::Parser::Multiplexer(3pm) Perl Programmers Reference Guide TAP::Parser::Multiplexer(3pm)NAME
TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers
VERSION
Version 3.23
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.16.2 2012-10-25 TAP::Parser::Multiplexer(3pm)
Check Out this Related Man Page
TAP::Parser::Iterator::Array(3pm) Perl Programmers Reference Guide TAP::Parser::Iterator::Array(3pm)NAME
TAP::Parser::Iterator::Array - Internal TAP::Parser array Iterator
VERSION
Version 3.17
SYNOPSIS
# see TAP::Parser::IteratorFactory for preferred usage
# to use directly:
use TAP::Parser::Iterator::Array;
my @data = ('foo', 'bar', baz');
my $it = TAP::Parser::Iterator::Array->new(@data);
my $line = $it->next;
DESCRIPTION
This is a simple iterator wrapper for arrays of scalar content, 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. Takes one argument: an $array_ref
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. For an array iterator this will always be zero.
"exit"
Get the exit status for this iterator. For an array iterator this will always be 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::Array(3pm)
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)
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)