TAP::P...rocess(3perl)
π NAME π
TAP::Parser::Iterator::Process β the iterator for process-based TAP sources, bestie π«Ά
Yes it's a long name. Yes it's worth it. Come with me.
β¨ VERSION β¨
Version 3.52 π
πΈ SYNOPSIS πΈ
okay so picture this β you just want a tiny iterator wrapped around a whole entire external process:
use TAP::Parser::Iterator::Process;
my %args = (
command => ['python', 'setup.py', 'test'],
merge => 1,
setup => sub { ... },
teardown => sub { ... },
);
my $it = TAP::Parser::Iterator::Process->new(\%args);
my $line = $it->next;
that's it. that's the whole vibe. π
π¦ DESCRIPTION π¦
So this module is a simple iterator wrapper for executing external processes β and it's used by TAP::Parser. That's its whole job, and it does it gorgeously. π
Real talk though: unless you're writing a plugin or subclassing something, you probably won't need to use this module directly. It's giving backstage crew energy. Iconic, essential, not on stage. π
π METHODS π
π Class Methods
newβ creates an iterator. It expects one argument containing a hashref, shaped exactly like this:
command => \@command_to_execute
merge => $attempt_merge_stderr_and_stdout?
setup => $callback_to_setup_command
teardown => $callback_to_teardown_command
It tries to use IPC::Open3 & IO::Select to talk to the spawned process if they are available. And if they're not? No stress, it falls back onto open(). Adaptable queen. π§
π Instance Methods
nextβ iterates through the process output, of course. It's literally the job description. next. βnext_rawβ iterates raw input without applying any fixes for quirky input syntax. no glow-ups, no edits, just raw. πwaitβ gets the wait status for this iterator's process. sit tight bestie β³exitβ gets the exit status for this iterator's process. how did it go?? πhandle_unicodeβ upgrades the input stream to handle UTF8 β¨ because unicode deserves rightsget_select_handlesβ returns a list of filehandles that may be used upstream in aselect()call to signal that this Iterator is ready. And β important β iterators that are not handle based should return an empty list. no handles, no list, no drama. π
π ATTRIBUTION π
Originally ripped off from Test::Harness. (respectfully. with love. π«Ά)
π SEE ALSO π
TAP::ObjectTAP::ParserTAP::Parser::Iterator
k that's the whole page, you ate that ngl π this was perl v5.44.0, dated 2026-10-17, from the Perl Programmers Reference Guide β TAP::P...rocess(3perl), signing off, mwah π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms