line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IPC::PrettyPipe::DSL; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: shortcuts to building an B object |
4
|
|
|
|
|
|
|
|
5
|
10
|
|
|
10
|
|
2416012
|
use strict; |
|
10
|
|
|
|
|
74
|
|
|
10
|
|
|
|
|
295
|
|
6
|
10
|
|
|
10
|
|
57
|
use warnings; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
372
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.13'; |
9
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
53
|
use Carp; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
663
|
|
11
|
|
|
|
|
|
|
our @CARP_NOT; |
12
|
|
|
|
|
|
|
|
13
|
10
|
|
|
10
|
|
6134
|
use List::MoreUtils qw[ zip ]; |
|
10
|
|
|
|
|
130045
|
|
|
10
|
|
|
|
|
72
|
|
14
|
10
|
|
|
10
|
|
15538
|
use Safe::Isa; |
|
10
|
|
|
|
|
5216
|
|
|
10
|
|
|
|
|
1410
|
|
15
|
|
|
|
|
|
|
|
16
|
10
|
|
|
10
|
|
5159
|
use IPC::PrettyPipe; |
|
10
|
|
|
|
|
44
|
|
|
10
|
|
|
|
|
452
|
|
17
|
10
|
|
|
10
|
|
82
|
use IPC::PrettyPipe::Cmd; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
219
|
|
18
|
10
|
|
|
10
|
|
53
|
use IPC::PrettyPipe::Arg; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
209
|
|
19
|
10
|
|
|
10
|
|
50
|
use IPC::PrettyPipe::Stream; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
224
|
|
20
|
|
|
|
|
|
|
|
21
|
10
|
|
|
10
|
|
53
|
use parent 'Exporter'; |
|
10
|
|
|
|
|
28
|
|
|
10
|
|
|
|
|
87
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
24
|
|
|
|
|
|
|
construct => [qw( ppipe ppcmd pparg ppstream )], |
25
|
|
|
|
|
|
|
attributes => [qw( argpfx argsep )], |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
## no critic (ProhibitSubroutinePrototypes) |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
9
|
1
|
23247
|
sub argsep($) { IPC::PrettyPipe::Arg::Format->new( sep => @_ ) } |
40
|
21
|
|
|
21
|
1
|
54862
|
sub argpfx($) { IPC::PrettyPipe::Arg::Format->new( pfx => @_ ) } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
our @EXPORT_OK = map { @{$_} } values %EXPORT_TAGS; |
44
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = \@EXPORT_OK; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub pparg { |
72
|
|
|
|
|
|
|
|
73
|
5
|
|
|
5
|
1
|
11249
|
my $fmt = IPC::PrettyPipe::Arg::Format->new; |
74
|
|
|
|
|
|
|
|
75
|
5
|
|
100
|
|
|
2423
|
while ( @_ && $_[0]->$_isa( 'IPC::PrettyPipe::Arg::Format' ) ) { |
76
|
|
|
|
|
|
|
|
77
|
3
|
|
|
|
|
62
|
shift()->copy_into( $fmt ); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
5
|
|
|
|
|
57
|
my @arg = @_; |
81
|
|
|
|
|
|
|
|
82
|
5
|
100
|
|
|
|
20
|
if ( @arg == 1 ) { |
|
|
100
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
1
|
50
|
|
|
|
5
|
unless ( 'HASH' eq ref $arg[0] ) { |
85
|
|
|
|
|
|
|
|
86
|
1
|
|
|
|
|
3
|
unshift @arg, 'name'; |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
elsif ( @arg == 2 ) { |
92
|
|
|
|
|
|
|
|
93
|
3
|
|
|
|
|
5
|
@arg = zip @{ [ 'name', 'value' ] }, @arg; |
|
3
|
|
|
|
|
21
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
5
|
50
|
|
|
|
27
|
return IPC::PrettyPipe::Arg->new( @arg, |
98
|
|
|
|
|
|
|
( @arg == 1 ? () : ( fmt => $fmt->clone ) ) ); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub ppstream { |
125
|
|
|
|
|
|
|
|
126
|
2
|
|
|
2
|
1
|
8
|
my @stream = @_; |
127
|
|
|
|
|
|
|
|
128
|
2
|
50
|
|
|
|
15
|
if ( @stream == 1 ) { |
|
|
50
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
0
|
0
|
|
|
|
0
|
unless ( 'HASH' eq ref $stream[0] ) { |
131
|
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
0
|
unshift @stream, 'spec'; |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
elsif ( @stream == 2 ) { |
138
|
|
|
|
|
|
|
|
139
|
2
|
|
|
|
|
6
|
@stream = zip @{ [ 'spec', 'file' ] }, @stream; |
|
2
|
|
|
|
|
23
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
2
|
|
|
|
|
53
|
return IPC::PrettyPipe::Stream->new( @stream ); |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
sub ppcmd { |
212
|
|
|
|
|
|
|
|
213
|
19
|
|
|
19
|
1
|
45430
|
my $argfmt = IPC::PrettyPipe::Arg::Format->new; |
214
|
|
|
|
|
|
|
|
215
|
19
|
|
100
|
|
|
7198
|
while ( @_ && $_[0]->$_isa( 'IPC::PrettyPipe::Arg::Format' ) ) { |
216
|
|
|
|
|
|
|
|
217
|
4
|
|
|
|
|
89
|
shift->copy_into( $argfmt ); |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
|
220
|
19
|
|
|
|
|
517
|
my $cmd = IPC::PrettyPipe::Cmd->new( cmd => shift, argfmt => $argfmt ); |
221
|
|
|
|
|
|
|
|
222
|
18
|
|
|
|
|
77
|
$cmd->ffadd( @_ ); |
223
|
|
|
|
|
|
|
|
224
|
18
|
|
|
|
|
133
|
return $cmd; |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
sub ppipe { |
349
|
|
|
|
|
|
|
|
350
|
90
|
|
|
90
|
1
|
224196
|
my $argfmt = IPC::PrettyPipe::Arg::Format->new; |
351
|
|
|
|
|
|
|
|
352
|
90
|
|
100
|
|
|
14263
|
while ( @_ && $_[0]->$_isa( 'IPC::PrettyPipe::Arg::Format' ) ) { |
353
|
|
|
|
|
|
|
|
354
|
6
|
|
|
|
|
129
|
shift->copy_into( $argfmt ); |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
|
357
|
90
|
|
|
|
|
3185
|
my $pipe = IPC::PrettyPipe->new( argfmt => $argfmt ); |
358
|
|
|
|
|
|
|
|
359
|
90
|
|
|
|
|
375
|
$pipe->ffadd( @_ ); |
360
|
|
|
|
|
|
|
|
361
|
90
|
|
|
|
|
931
|
return $pipe; |
362
|
|
|
|
|
|
|
} |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
1; |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
# |
368
|
|
|
|
|
|
|
# This file is part of IPC-PrettyPipe |
369
|
|
|
|
|
|
|
# |
370
|
|
|
|
|
|
|
# This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory. |
371
|
|
|
|
|
|
|
# |
372
|
|
|
|
|
|
|
# This is free software, licensed under: |
373
|
|
|
|
|
|
|
# |
374
|
|
|
|
|
|
|
# The GNU General Public License, Version 3, June 2007 |
375
|
|
|
|
|
|
|
# |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
__END__ |