Debian Codegraph @

upstream/opensuse-tumbleweed/man3/TAP::Parser::Iterator::Process.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "TAP::Parser::Iterator::Process 3pm"
61 .TH TAP::Parser::Iterator::Process 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 TAP::Parser::Iterator::Process \- Iterator for process\-based TAP sources
68 .SH VERSION
69 .IX Header "VERSION"
70 Version 3.50
71 .SH SYNOPSIS
72 .IX Header "SYNOPSIS"
73 .Vb 9
74 \& use TAP::Parser::Iterator::Process;
75 \& my %args = (
76 \& command => [\*(Aqpython\*(Aq, \*(Aqsetup.py\*(Aq, \*(Aqtest\*(Aq],
77 \& merge => 1,
78 \& setup => sub { ... },
79 \& teardown => sub { ... },
80 \& );
81 \& my $it = TAP::Parser::Iterator::Process\->new(\e%args);
82 \& my $line = $it\->next;
83 .Ve
84 .SH DESCRIPTION
85 .IX Header "DESCRIPTION"
86 This is a simple iterator wrapper for executing external processes, used by
87 TAP::Parser. Unless you\*(Aqre writing a plugin or subclassing, you probably
88 won\*(Aqt need to use this module directly.
89 .SH METHODS
90 .IX Header "METHODS"
91 .SS "Class Methods"
92 .IX Subsection "Class Methods"
93 \fR\f(CI\*(C`new\*(C'\fR\fI\fR
94 .IX Subsection "new"
95 .PP
96 Create an iterator. Expects one argument containing a hashref of the form:
97 .PP
98 .Vb 4
99 \& command => \e@command_to_execute
100 \& merge => $attempt_merge_stderr_and_stdout?
101 \& setup => $callback_to_setup_command
102 \& teardown => $callback_to_teardown_command
103 .Ve
104 .PP
105 Tries to uses IPC::Open3 & IO::Select to communicate with the spawned
106 process if they are available. Falls back onto \f(CWopen()\fR.
107 .SS "Instance Methods"
108 .IX Subsection "Instance Methods"
109 \fR\f(CI\*(C`next\*(C'\fR\fI\fR
110 .IX Subsection "next"
111 .PP
112 Iterate through the process output, of course.
113 .PP
114 \fR\f(CI\*(C`next_raw\*(C'\fR\fI\fR
115 .IX Subsection "next_raw"
116 .PP
117 Iterate raw input without applying any fixes for quirky input syntax.
118 .PP
119 \fR\f(CI\*(C`wait\*(C'\fR\fI\fR
120 .IX Subsection "wait"
121 .PP
122 Get the wait status for this iterator\*(Aqs process.
123 .PP
124 \fR\f(CI\*(C`exit\*(C'\fR\fI\fR
125 .IX Subsection "exit"
126 .PP
127 Get the exit status for this iterator\*(Aqs process.
128 .PP
129 \fR\f(CI\*(C`handle_unicode\*(C'\fR\fI\fR
130 .IX Subsection "handle_unicode"
131 .PP
132 Upgrade the input stream to handle UTF8.
133 .PP
134 \fR\f(CI\*(C`get_select_handles\*(C'\fR\fI\fR
135 .IX Subsection "get_select_handles"
136 .PP
137 Return a list of filehandles that may be used upstream in a \fBselect()\fR
138 call to signal that this Iterator is ready. Iterators that are not
139 handle based should return an empty list.
140 .SH ATTRIBUTION
141 .IX Header "ATTRIBUTION"
142 Originally ripped off from Test::Harness.
143 .SH "SEE ALSO"
144 .IX Header "SEE ALSO"
145 TAP::Object,
146 TAP::Parser,
147 TAP::Parser::Iterator,