lib/Proc/ShellSpawn/Large.pm

filter: Statementstmt 95.2% 379 / 398 Branchbran 79.7% 193 / 242 Conditioncond 69.2% 135 / 195 MC/DCmcdc 39.2% 40 / 102 Subroutinesub 95.0% 58 / 61 Podpod 0.0% 0 / 31 totaltotal 78.2% 805 / 1029 CC 210 SCAR 25.4
CC
210
Cov
85%
b_command
30.8
b_kill
23.8
b_set
22.3
CRAP 12.7
« lib/Proc/ShellSubset/Small.pm ↑ Summary lib/Proc/ShellSpawn/Builtins.pm »
1 package Proc::ShellSpawn::Large;
2 212 our $VERSION = '0.13';
3 # EXPERIMENTAL, awaiting approval: what Proc::ShellSpawn needs to run Proc::ShellSubset::Large trees
4 # (doc/large-subset/large-subset-spec.md, sections 4 and 5), as handlers named in Proc::ShellSpawn's tables:
5 # x_NAME(CONTEXT, NODE, TAIL, K) command nodes { func | export | readonly | local | exec => ... }
6 # b_NAME(CONTEXT, ARGV, ENV, K, DATA) builtins, and call() for functions
7 # Each calls K exactly once, or ends the shell (Proc::ShellSpawn::leave or Proc::ShellSpawn::fail), and never waits.
8 212 ▶use strict; use warnings; use feature 'current_sub';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
9 212 ▶use POSIX ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 212 ▶use Scalar::Util qw(weaken);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 212 ▶use Proc::ShellSpawn;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # JU3 (post-0.12, the user, 2026-11-15): the shell layer's functions are called through the alias ProcSS (Proc::ShellSpawn
14 # sets it), not imported; lines longer than 132 columns because of it stay unwrapped (the user's word, an exception to JQ1)
15  
16 212 our $UNSUPPORTED = 248; # A4: the status when something outside the subset shows up at run time (250 - 2: sh's syntax error
17 # status, moved out of the common range; doc/large-subset/large-subset-spec.md, section 5)
18 3 ▶sub unsupported { # A4: something outside the subset, found at run time
Subroutine unsupported: called CC=1 SCAR=0.0
Pod undocumented
19 3 ▶ my ($c, $what) = @_; ProcSS::put($c, 2, "Proc::ShellSubset::Large: $what is not supported\n", sub { ProcSS::leave($c, $UNSUPPORTED) }) }
Subroutine __ANON__: called CC=1 SCAR=0.0
20 32 ▶sub parse_text { # TEXT read by the run's own parser (@opt: its options): the tree; or, outside the subset, undef after
Subroutine parse_text: called CC=2 SCAR=8.4
Pod undocumented
21 32 my ($c, $text, $what, @opt) = @_; # ending the shell (A4), $what naming the text in the message
22 32 my $t = $c->{sh}{parse}->($text, @opt);
23 0 ▶ ref $t eq 'ARRAY' ? $t : do { unsupported($c, $what); undef } }
Branch: 1 branch
BranchTrueFalseTotal
ref $t eq 'ARRAY' ? : 32 0 32
24 27 ▶sub aliases { my $al = $_[0]{sh}{alias}; %$al ? (aliases => { %$al }) : () } # the parser's option: the aliases defined so far
Subroutine aliases: called CC=2 SCAR=6.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
%$al ? : 3 24 27
25 25 ▶sub run_text { # eval, ., trap actions: parse with the large grammar and run in this shell
Subroutine run_text: called CC=4 SCAR=13.9
Pod undocumented
26 25 my ($c, $text, $what, $k) = @_; my $sh = $c->{sh};
27 25 ▶ my $t = parse_text($c, $text, $what, aliases($c), $what =~ /^the text of '\. / ? () : (nolineno => 1)) # $LINENO in eval
Branch: 1 branch
BranchTrueFalseTotal
$what =~ /^the text of '\. / ? : 4 21 25
Condition50%1/2
parse_text($c, $text, $what, aliases($c), $what =~ /^the text of '\. / ? () : ("nolineno", 1)) // (return)
l!l
250
MC/DC0%0/1
parse_text($c, $text, $what, aliases($c), $what =~ /^the text of '\. / ? () : ("nolineno", 1)) // (return)
parse_text($c, $text, $what, aliases($c), $what =~ /^the text of '\. / ? () : ("nolineno", 1))
Truth table50%1/2
A
A= parse_text($c, $text, $what, aliases($c), $what =~ /^the text of '\. / ? () : ("nolineno", 1))
Aresult
11
00
28 // return; # or trap text: A4 (G8)
29 25 ▶ return ProcSS::defer($k, 0) unless @$t;
Branch: 1 branch
BranchTrueFalseTotal
unless @$t 5 20 25
30 20 ▶ $sh->{intext}++; ProcSS::x_list($c, $t, undef, sub { $sh->{intext}--; $k->(@_) }) } # alias in this text: B1, A4
Subroutine __ANON__: called CC=1 SCAR=0.0
31 0 ▶sub b_unsupported { my ($c, $argv) = @_; unsupported($c, "'$argv->[0]'") } # a builtin left to sh, named at run time
Subroutine b_unsupported: not called CC=1 SCAR=6.9
Pod undocumented
32 2 ▶sub x_rest { # P1 (post2-0.04): the rest of the text after a line with an alias definition known only when it ran: parsed now,
Subroutine x_rest: called CC=3 SCAR=11.3
Pod undocumented
33 # with the aliases defined by now, as both shells read a text one complete command at a time; a form outside the subset: A4
34 2 my ($c, $x, $tail, $k) = @_; my $sh = $c->{sh};
35 2 ▶ my $t = parse_text($c, $x->{rest}, "a command after an alias definition", aliases($c), lineoff => $x->{lineoff}) // return;
Condition50%1/2
parse_text($c, $x->{"rest"}, "a command after an alias definition", aliases($c), "lineoff", $x->{"lineoff"}) // (return)
l!l
20
MC/DC0%0/1
parse_text($c, $x->{"rest"}, "a command after an alias definition", aliases($c), "lineoff", $x->{"lineoff"}) // (return)
parse_text($c, $x->{"rest"}, "a command after an alias definition", aliases($c), "lineoff", $x->{"lineoff"})
Truth table50%1/2
A
A= parse_text($c, $x->{"rest"}, "a command after an alias definition", aliases($c), "lineoff", $x->{"lineoff"})
Aresult
11
00
36 2 ▶ return ProcSS::defer($k, $sh->{q}) unless @$t;
Branch: 1 branch
BranchTrueFalseTotal
unless @$t 0 2 2
37 2 ProcSS::x_list($c, $t, $tail, $k) }
38 5 ▶sub b_late { # 3A (post-0.04): a command whose name the text also defines as a function, which is not defined (yet):
Subroutine b_late: called CC=2 SCAR=7.0
Pod undocumented
39 # parsed again from its expanded words, quoted, so that the builtin's own checks apply as they would have at parse time
40 5 ▶ my ($c, $argv, $env, $k) = @_; my $q = sub { (my $w = shift) =~ s/'/'\\''/g; "'$w'" };
Subroutine __ANON__: called CC=1 SCAR=0.0
41 5 my $text = join ' ', (map "$_=" . $q->($env->{$_}), sort keys %$env), map $q->($_), @$argv;
42 5 ▶ my $t = parse_text($c, $text, "'$argv->[0]' in this form") // return; # (no aliases: every word is quoted)
Condition50%1/2
parse_text($c, $text, "'$argv->[0]' in this form") // (return)
l!l
50
MC/DC0%0/1
parse_text($c, $text, "'$argv->[0]' in this form") // (return)
parse_text($c, $text, "'$argv->[0]' in this form")
Truth table50%1/2
A
A= parse_text($c, $text, "'$argv->[0]' in this form")
Aresult
11
00
43 5 ProcSS::x_list($c, $t, undef, $k) }
44  
45 # ------------------------------------------------------------------ functions
46 35 ▶sub x_func { my ($c, $x, $tail, $k) = @_; $c->{sh}{cmd}{$x->{func}} = ['Proc::ShellSpawn::Large::call', $x->{body}]; ProcSS::defer($k, 0) }
Subroutine x_func: called CC=1 SCAR=0.0
Pod undocumented
47 34 ▶sub call { # NAME ARGS...: the body in this shell, with its own positional parameters and frame
Subroutine call: called CC=3 SCAR=11.0
Pod undocumented
48 34 my ($c, $argv, $env, $k, $body) = @_; my $sh = $c->{sh};
49 34 my ($old, %saved) = $sh->{args}; # settings before the call: for its duration, exported (dash)
50 34 for (sort keys %$env) { $saved{$_} = [exists $sh->{vars}{$_}, $sh->{vars}{$_}, $sh->{exp}{$_}];
51 1 ▶ ProcSS::setvar($c, $_, $env->{$_}) or return; $sh->{exp}{$_} = 1 }
Branch: 1 branch
BranchTrueFalseTotal
Proc::ShellSpawn::setvar($c, $_, $env->{$_}) or return 1 0 1
52 34 $sh->{args} = [@$argv[1 .. $#$argv]];
53 34 my $saved = \%saved;
54 34 ▶ my $ret = sub { my $st = shift; restore($sh, $saved); $sh->{args} = $old; ProcSS::defer($k, $st) };
Subroutine __ANON__: called CC=1 SCAR=0.0
55 34 ProcSS::x_cmd({ %$c, loops => [], held => 0, frame => { saved => $saved, ret => $ret } }, $body, undef, $ret) }
56 32 ▶sub restore { # put back variables a function changed with local, or settings before its call
Subroutine restore: called CC=4 SCAR=14.0
Pod undocumented
57 32 my ($sh, $saved) = @_;
58 32 for my $n (keys %$saved) { my ($had, $v, $exp) = @{delete $saved->{$n}};
59 2 ▶ if ($had) { $sh->{vars}{$n} = $v } else { delete $sh->{vars}{$n} }
Branch: 1 branch
BranchTrueFalseTotal
if ($had) { } 1 1 2
60 0 ▶ if ($exp) { $sh->{exp}{$n} = 1 } else { delete $sh->{exp}{$n} } } }
Branch: 1 branch
BranchTrueFalseTotal
if ($exp) { } 0 2 2
61 10 ▶sub b_return {
Subroutine b_return: called CC=7 SCAR=19.5
Pod undocumented
62 10 ▶ my ($c, $argv, $env, $k) = @_; my $st = $argv->[1] // $c->{sh}{q};
Condition66%2/3
$argv->[1] // $c->{"sh"}{"q"}
l!l&&r!l&&!r
460
MC/DC0%0/2
$argv->[1] // $c->{"sh"}{"q"}
$argv->[1] $c->{"sh"}{"q"}
Truth table66%2/3
A // B
A= $argv->[1]B= $c->{"sh"}{"q"}
ABresult
1X1
011
000
63 10 ▶ return ProcSS::fail($c, 2, "return: Illegal number: $st") # NV1 (X42): known only at run time, as the shells
Branch: 1 branch
BranchTrueFalseTotal
if defined $argv->[1] and not Proc::ShellSpawn::ok_num($st, 0) 1 9 10
Condition100%3/3
defined $argv->[1] and not Proc::ShellSpawn::ok_num($st, 0)
!ll&&!rl&&r
631
MC/DC100%2/2
defined $argv->[1] and not Proc::ShellSpawn::ok_num($st, 0)
defined $argv->[1] not Proc::ShellSpawn::ok_num($st, 0)
Truth table100%3/3
A and not(B)
A= defined $argv->[1]B= not Proc::ShellSpawn::ok_num($st, 0)
ABresult
0X0
100
111
64 if defined $argv->[1] && !ProcSS::ok_num($st, 0);
65 9 $st += 0;
66 my $fr = $c->{frame} or return $c->{sh}{intext} ? ProcSS::leave($c, $st) # outside a function, in eval or . text: as exit
67 9 ▶ : $c->{cond} ? ProcSS::msg($c, "return: can only `return' from a function or sourced script", ProcSS::done($k, 2)) # X48:
Branch: 3 branches
BranchTrueFalseTotal
my $fr = $c->{"frame"} or return $c->{"sh"}{"intext"} ? Proc::ShellSpawn::leave($c, $st) : ($c->{"cond"} ? Proc::ShellSpawn::msg($c, "return: can only `return' from a function or sourced script", Proc::ShellSpawn::done($k, 2)) : Proc::ShellSpawn::fail($c, 2, "return: can only `return' from a function or sourced script")) 2 7 9
$c->{'sh'}{'intext'} ? : 0 7 7
$c->{'cond'} ? : 4 3 7
68 : ProcSS::fail($c, 2, "return: can only `return' from a function or sourced script"); # tested (&&, ||, !, if,
69 # while): status 2, the shell goes on; else the shell ends, status 2: both as bash --posix (rule E)
70 2 ProcSS::release_ctx($c); ProcSS::release_all(map $_->{scope}, @{$c->{loops}}); $fr->{ret}->($st) }
71  
72 # ------------------------------------------------------------------ declarations
73 8 ▶sub declare { # export, readonly, local: [NAME, Word or undef, ...]; $each->(NAME) after the value is set
Subroutine declare: called CC=2 SCAR=7.4
Pod undocumented
74 8 ▶ my ($c, $list, $k, $each, $what) = @_; my @l = @$list; my @pairs; push @pairs, [splice @l, 0, 2] while @l;
Branch: 1 branch
BranchTrueFalseTotal
@l and do { push @pairs, [splice(@l, 0, 2)] } 307 8 315
75 8 my @log; # NAME or NAME=VALUE as set, for $Proc::ShellSpawn::ONBUILTIN (measurement)
76 307 ▶ ProcSS::each_async(\@pairs, sub { my ($p, $next) = @_; my ($n, $w) = @$p;
Subroutine __ANON__: called CC=2 SCAR=7.6
77 307 ▶ my $set = sub { my $m = shift; # the name is known: its value, if one is given, then $each
Subroutine __ANON__: called CC=2 SCAR=6.9
78 307 ▶ return push(@log, $m), $each->($m), $next->() unless defined $w;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $w 301 6 307
79 307 ▶ ProcSS::expand_str($c, $w, sub { my $v = shift; push @log, "$m=$v"; ProcSS::setvar($c, $m, $v) or return; $each->($m); $next->() }) };
Subroutine __ANON__: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
Proc::ShellSpawn::setvar($c, $m, $v) or return 6 0 6
80 307 ▶ return $set->($n) unless ref $n;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $n 307 0 307
81 0 ▶ ProcSS::expand_str($c, $n, sub { my $m = shift; # export $v[=value] (parser item P4): the name known only now
Subroutine __ANON__: not called CC=2 SCAR=17.9
82 0 ▶ Proc::ShellSubset::settable($m) or return unsupported($c, "the name '$m' in 'export'"); # post-0.04:
Branch: 1 branch
BranchTrueFalseTotal
Proc::ShellSubset::settable($m) or return unsupported($c, "the name '${m}' in 'export'") 0 0 0
83 # the old test let every name pass
84 0 $set->($m) }) },
85 8 ▶ sub { $Proc::ShellSpawn::ONBUILTIN->("x_$what", [$what, @log], {}) if $what && $Proc::ShellSpawn::ONBUILTIN; ProcSS::defer($k, 0) }) }
Subroutine __ANON__: called CC=3 SCAR=12.5
Branch: 1 branch
BranchTrueFalseTotal
if $what and $Proc::ShellSpawn::ONBUILTIN 0 8 8
Condition33%1/3
$what and $Proc::ShellSpawn::ONBUILTIN
!ll&&!rl&&r
080
MC/DC0%0/2
$what and $Proc::ShellSpawn::ONBUILTIN
$what $Proc::ShellSpawn::ONBUILTIN
Truth table33%1/3
A and B
A= $whatB= $Proc::ShellSpawn::ONBUILTIN
ABresult
0X0
100
111
86 302 ▶sub x_export { my ($c, $x, $tail, $k) = @_; declare($c, $x->{export}, $k, sub { $c->{sh}{exp}{$_[0]} = 1 }, 'export') }
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine x_export: called CC=1 SCAR=0.0
Pod undocumented
87 4 ▶sub x_readonly { my ($c, $x, $tail, $k) = @_; declare($c, $x->{readonly}, $k, sub { $c->{sh}{ro}{$_[0]} = 1 }, 'readonly') }
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine x_readonly: called CC=1 SCAR=0.0
Pod undocumented
88 1 ▶sub x_local {
Subroutine x_local: called CC=4 SCAR=14.0
Pod undocumented
89 1 my ($c, $x, $tail, $k) = @_; my $fr = $c->{frame};
90 1 ▶ return ProcSS::fail($c, 2, "local: not in a function") unless $fr; # A5 (reached only dynamically)
Branch: 1 branch
BranchTrueFalseTotal
unless $fr 0 1 1
91 1 my $sh = $c->{sh}; my %l = @{$x->{local}};
92 1 ▶ $fr->{saved}{$_} //= [exists $sh->{vars}{$_}, $sh->{vars}{$_}, $sh->{exp}{$_}] for keys %l;
Condition50%1/2
$fr->{"saved"}{$_} //= [exists $sh->{"vars"}{$_}, $sh->{"vars"}{$_}, $sh->{"exp"}{$_}]
l!l
01
MC/DC0%0/1
$fr->{"saved"}{$_} //= [exists $sh->{"vars"}{$_}, $sh->{"vars"}{$_}, $sh->{"exp"}{$_}]
$fr->{"saved"}{$_}
Truth table50%1/2
A
A= $fr->{"saved"}{$_}
Aresult
11
00
93 1 ▶ declare($c, $x->{local}, $k, sub {}, 'local') }
Subroutine __ANON__: called CC=1 SCAR=0.0
94  
95 # ------------------------------------------------------------------ exec with redirections only: for the rest of the shell
96 2 ▶sub x_exec {
Subroutine x_exec: called CC=2 SCAR=7.3
Pod undocumented
97 2 my ($c, $x, $tail, $k) = @_;
98 2 ▶ ProcSS::redirect($c, $x->{redir} // [], sub {
Subroutine __ANON__: called CC=8 SCAR=22.3
99 2 ▶ my ($m, $opened) = @_ or return ProcSS::leave($c, 2); # a special builtin: a failed redirection ends the shell
Branch: 1 branch
BranchTrueFalseTotal
my($m, $opened) = or return Proc::ShellSpawn::leave($c, 2) 2 0 2
100 2 ProcSS::hold($_) for grep defined, values %$m; ProcSS::release($_) for @$opened;
101 2 ▶ my $old = $c->{held} && !$c->{released} ? $c->{map} : {};
Branch: 1 branch
BranchTrueFalseTotal
$c->{'held'} && !$c->{'released'} ? : 0 2 2
Condition33%1/3
$c->{"held"} and not $c->{"released"}
!ll&&!rl&&r
200
MC/DC0%0/2
$c->{"held"} and not $c->{"released"}
$c->{"held"} not $c->{"released"}
Truth table33%1/3
A and not(B)
A= $c->{"held"}B= not $c->{"released"}
ABresult
0X0
100
111
102 2 $c->{map} = $m; ProcSS::release($_) for grep defined, values %$old;
103 2 ▶ push @{$c->{shell}{scope}}, $c unless $c->{held}; # released when the shell ends
Branch: 1 branch
BranchTrueFalseTotal
unless $c->{"held"} 2 0 2
104 2 ▶ @$c{qw(held released)} = (1, 0); ProcSS::defer($k, 0) }) }
Condition50%1/2
$x->{"redir"} // []
l!l
20
MC/DC0%0/1
$x->{"redir"} // []
$x->{"redir"}
Truth table50%1/2
A
A= $x->{"redir"}
Aresult
11
00
105  
106 # ------------------------------------------------------------------ builtins
107 5 ▶sub b_shift {
Subroutine b_shift: called CC=4 SCAR=13.9
Pod undocumented
108 5 ▶ my ($c, $argv, $env, $k) = @_; my $n = $argv->[1] // 1; my $a = $c->{sh}{args};
Condition100%2/2
$argv->[1] // 1
l!l
41
MC/DC100%1/1
$argv->[1] // 1
$argv->[1]
Truth table100%2/2
A
A= $argv->[1]
Aresult
11
00
109 5 ▶ return ProcSS::fail($c, 2, "shift: Illegal number: $n") unless ProcSS::ok_num($n, 0); # NV1 (X46): -1, x1 at run time
Branch: 1 branch
BranchTrueFalseTotal
unless Proc::ShellSpawn::ok_num($n, 0) 2 3 5
110 3 $n += 0;
111 3 ▶ return ProcSS::fail($c, 2, "shift: can't shift that many") if $n > @$a;
Branch: 1 branch
BranchTrueFalseTotal
if $n > @$a 1 2 3
112 2 splice @$a, 0, $n; ProcSS::defer($k, 0) }
113  
114 212 my %OPT = (errexit => 'e', nounset => 'u', noglob => 'f', noclobber => 'C', allexport => 'a',
115 notify => 'b', ignoreeof => 'ignoreeof', nolog => 'nolog'); # the last three, and +m, do nothing here (P6)
116 46 ▶sub b_set {
Subroutine b_set: called CC=21 SCAR=31.0
Pod undocumented
117 46 my ($c, $argv, $env, $k) = @_; my @a = @$argv[1 .. $#$argv]; my $o = $c->{sh}{opt}; my $ops;
118 46 ▶ while (@a) {
Branch: 1 branch
BranchTrueFalseTotal
if (@a) 46 27 73
119 46 my $x = $a[0];
120 46 ▶ if ($x eq '--') { shift @a; $ops = 1; last }
Branch: 1 branch
BranchTrueFalseTotal
if ($x eq "--") 17 29 46
121 29 ▶ last unless $x =~ /^([-+])(.+)/; shift @a; my ($on, $f) = ($1 eq '-', $2);
Branch: 1 branch
BranchTrueFalseTotal
unless $x =~ /^([-+])(.+)/ 0 29 29
122 return ProcSS::fail($c, 2, "set: Illegal option -o history") # B2: as dash, when the caller asked for dash's interactive builtins
123 29 ▶ if $f eq 'o' && ($a[0] // '') eq 'history' && $c->{sh}{interactive} eq 'dash';
Branch: 1 branch
BranchTrueFalseTotal
if $f eq "o" and ($a[0] // "") eq "history" and $c->{"sh"}{"interactive"} eq "dash" 0 29 29
Condition50%4/8
$f eq "o" and ($a[0] // "") eq "history" and $c->{"sh"}{"interactive"} eq "dash"
!ll&&!rl&&r
2900
$f eq "o" and ($a[0] // "") eq "history"
!ll&&!rl&&r
2090
$a[0] // ""
l!l
90
MC/DC0%0/3
$f eq "o" and ($a[0] // "") eq "history" and $c->{"sh"}{"interactive"} eq "dash"
$f eq "o" $a[0] $c->{"sh"}{"interactive"} eq "dash"
Truth table25%1/4
A and B and C
A= $f eq "o"B= $a[0]C= $c->{"sh"}{"interactive"} eq "dash"
ABCresult
0XX0
10X0
1100
1111
124 29 ▶ if ($f eq 'o') { # NV1 (X43): a name known only at run time; none: it lists (A4, as the parser has it)
Branch: 1 branch
BranchTrueFalseTotal
if ($f eq "o") 9 20 29
125 9 ▶ return unsupported($c, "'set -o' without a name (it lists)") unless @a;
Branch: 1 branch
BranchTrueFalseTotal
unless @a 0 9 9
126 9 my $n = shift @a;
127 9 ▶ exists $OPT{$n} || $n =~ /^(?:vi|emacs|history)\z/ or return ProcSS::fail($c, 2, "set: Illegal option -o $n");
Branch: 1 branch
BranchTrueFalseTotal
exists $OPT{$n} or $n =~ /^(?:vi|emacs|history)\z/ or return Proc::ShellSpawn::fail($c, 2, "set: Illegal option -o $n") 8 1 9
Condition100%3/3
exists $OPT{$n} or $n =~ /^(?:vi|emacs|history)\z/
l!l&&r!l&&!r
621
MC/DC100%2/2
exists $OPT{$n} or $n =~ /^(?:vi|emacs|history)\z/
exists $OPT{$n} $n =~ /^(?:vi|emacs|history)\z/
Truth table100%3/3
A or B
A= exists $OPT{$n}B= $n =~ /^(?:vi|emacs|history)\z/
ABresult
1X1
011
000
128 8 ▶ my $l = $OPT{$n} // ''; $on ? ($o->{$l} = 1) : delete $o->{$l}; next }
Branch: 1 branch
BranchTrueFalseTotal
$on ? : 8 0 8
Condition100%2/2
$OPT{$n} // ""
l!l
62
MC/DC100%1/1
$OPT{$n} // ""
$OPT{$n}
Truth table100%2/2
A
A= $OPT{$n}
Aresult
11
00
129 20 ▶ for my $l (split //, $f) { $l =~ /^[eufCab]\z/ || $l eq 'm' && !$on
Branch: 1 branch
BranchTrueFalseTotal
$l =~ /^[eufCab]\z/ or $l eq "m" and not $on or return Proc::ShellSpawn::fail($c, 2, "set: Illegal option $1$l") 19 1 20
Condition83%5/6
$l =~ /^[eufCab]\z/ or $l eq "m" and not $on
l!l&&r!l&&!r
1811
$l eq "m" and not $on
!ll&&!rl&&r
101
MC/DC66%2/3
$l =~ /^[eufCab]\z/ or $l eq "m" and not $on
$l =~ /^[eufCab]\z/ $l eq "m" not $on
Truth table75%3/4
A or B and not(C)
A= $l =~ /^[eufCab]\z/B= $l eq "m"C= not $on
ABCresult
1XX1
0111
00X0
0100
130 or return ProcSS::fail($c, 2, "set: Illegal option $1$l");
131 19 ▶ $on ? ($o->{$l} = 1) : delete $o->{$l} } }
Branch: 1 branch
BranchTrueFalseTotal
$on ? : 17 2 19
132 44 ▶ $c->{sh}{args} = [@a] if $ops || @a;
Branch: 1 branch
BranchTrueFalseTotal
if $ops or @a 17 27 44
Condition66%2/3
$ops or @a
l!l&&r!l&&!r
17027
MC/DC50%1/2
$ops or @a
$ops @a
Truth table66%2/3
A or B
A= $opsB= @a
ABresult
1X1
011
000
133 44 ProcSS::defer($k, 0) }
134  
135 6 ▶sub b_eval { my ($c, $argv, $env, $k) = @_; run_text($c, join(' ', @$argv[1 .. $#$argv]), "'eval' text", $k) }
Subroutine b_eval: called CC=1 SCAR=0.0
Pod undocumented
136 5 ▶sub b_dot {
Subroutine b_dot: called CC=8 SCAR=22.1
Pod undocumented
137 5 ▶ my ($c, $argv, $env, $k) = @_; my $f = $argv->[1] // '';
Condition50%1/2
$argv->[1] // ""
l!l
50
MC/DC0%0/1
$argv->[1] // ""
$argv->[1]
Truth table50%1/2
A
A= $argv->[1]
Aresult
11
00
138 5 ▶ my ($p) = ProcSS::has_dir($f) ? $f : grep -f ProcSS::path_in($c, $_), map +($_ eq '' ? '.' : $_) . "/$f",
Branch: 2 branches
BranchTrueFalseTotal
Proc::ShellSpawn::has_dir($f) ? : 5 0 5
$_ eq '' ? : 0 0 0
139 ProcSS::path_list(ProcSS::var($c, 'PATH'));
140 5 ▶ $p = ProcSS::path_in($c, $p) if defined $p;
Branch: 1 branch
BranchTrueFalseTotal
if defined $p 5 0 5
141 5 ▶ open my $fh, '<', $p // '' or return ProcSS::fail($c, 2, ".: cannot open $f: No such file");
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, "<", $p // "" or return Proc::ShellSpawn::fail($c, 2, ".: cannot open ${f}: No such file") 4 1 5
Condition50%1/2
$p // ""
l!l
50
MC/DC0%0/1
$p // ""
$p
Truth table50%1/2
A
A= $p
Aresult
11
00
142 4 ▶ my $text = do { local $/; <$fh> } // ''; # (X39: in list context an empty file, or a directory, gave no argument at all)
Condition100%2/2
do { local $/; readline $fh } // ""
l!l
31
MC/DC100%1/1
do { local $/; readline $fh } // ""
do { local $/; readline $fh }
Truth table100%2/2
A
A= do { local $/; readline $fh }
Aresult
11
00
143 4 run_text($c, $text, "the text of '. $f'", $k) }
144  
145 212 our %SIGNUM; *SIGNUM = \%Proc::Spawner::SIGNUM; # signal names => numbers: Proc::Spawner's table (JH3, part e)
146 212 my %SIGNAME = (%Proc::Spawner::SIGNAME, 0 => 'EXIT'); # numbers => names: its table too, and 0 as the shells have it
147 31 ▶sub b_trap { # names in any case, or numbers (P6); KILL and STOP cannot be caught: nothing to do, status 0, as both shells
Subroutine b_trap: called CC=15 SCAR=27.3
Pod undocumented
148 31 my ($c, $argv, $env, $k) = @_; my ($act, @sigs) = @$argv[1 .. $#$argv]; my $sh = $c->{sh};
149 31 ▶ for my $s (map /^[0-9]+\z/ ? $SIGNAME{$_} // $_ : uc, @sigs) {
Branch: 1 branch
BranchTrueFalseTotal
/^[0-9]+\z/ ? : 6 26 32
Condition33%1/3
$SIGNAME{$_} // $_
l!l&&r!l&&!r
600
MC/DC0%0/2
$SIGNAME{$_} // $_
$SIGNAME{$_} $_
Truth table33%1/3
A // B
A= $SIGNAME{$_}B= $_
ABresult
1X1
011
000
150 32 ▶ next if $s eq 'KILL' || $s eq 'STOP';
Branch: 1 branch
BranchTrueFalseTotal
if $s eq "KILL" or $s eq "STOP" 2 30 32
Condition100%3/3
$s eq "KILL" or $s eq "STOP"
l!l&&r!l&&!r
1130
MC/DC100%2/2
$s eq "KILL" or $s eq "STOP"
$s eq "KILL" $s eq "STOP"
Truth table100%3/3
A or B
A= $s eq "KILL"B= $s eq "STOP"
ABresult
1X1
011
000
151 30 ▶ next if $Proc::ShellSpawn::IGN0{$s}; # X49: ignored on entry: cannot be trapped or reset (POSIX; both shells)
Branch: 1 branch
BranchTrueFalseTotal
if $Proc::ShellSpawn::IGN0{$s} 1 29 30
152 29 ▶ if ($act eq '-') { delete $sh->{trap}{$s} } else { $sh->{trap}{$s} = $act }
Branch: 1 branch
BranchTrueFalseTotal
if ($act eq '-') { } 2 27 29
153 29 ▶ next if $s eq 'EXIT';
Branch: 1 branch
BranchTrueFalseTotal
if $s eq "EXIT" 11 18 29
154 18 ▶ next if $sh->{main}; # X51: a subshell runs in this process; a signal sent to it ($$, the group) is the main shell's,
Branch: 1 branch
BranchTrueFalseTotal
if $sh->{"main"} 2 16 18
155 # as in dash, where the subshell is another process (its trap: recorded, for 'trap' and its programs)
156 16 my $w = $c; weaken $w;
157 16 ▶ my $h = $sh->{tsub}{$s} = sub { return unless $w; push @{$w->{sh}{pend}}, $s }; # X51: run by the list, before its
Subroutine __ANON__: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
unless $w 0 8 8
158 # next command (X19): after the foreground command, as POSIX and both shells
159 16 ▶ next unless exists $SIGNUM{$s}; # a signal Perl does not have here (Windows: USR1, ...): only kill ... $$ sends it
Branch: 1 branch
BranchTrueFalseTotal
unless exists $Proc::ShellSpawn::Large::SIGNUM{$s} 0 16 16
160 16 ▶ $Proc::ShellSpawn::TRAPSAVE{$s} //= $SIG{$s} // 'DEFAULT';
Condition75%3/4
$Proc::ShellSpawn::TRAPSAVE{$s} //= $SIG{$s} // "DEFAULT"
l!l
016
$SIG{$s} // "DEFAULT"
l!l
124
MC/DC0%0/1
$Proc::ShellSpawn::TRAPSAVE{$s} //= $SIG{$s} // "DEFAULT"
$Proc::ShellSpawn::TRAPSAVE{$s}
Truth table50%1/2
A
A= $Proc::ShellSpawn::TRAPSAVE{$s}
Aresult
11
00
161 16 ▶ $SIG{$s} = $act eq '-' ? $Proc::ShellSpawn::TRAPSAVE{$s} : $act eq '' ? 'IGNORE' : $h } # queued: the action runs before the
Branch: 2 branches
BranchTrueFalseTotal
$act eq '-' ? : 0 16 16
$act eq '' ? : 2 14 16
162 # main shell's next command (X19: as dash, before what follows the command; X51: not while the command still runs)
163 31 ProcSS::defer($k, 0) }
164 8 ▶sub run_pending { # the actions of the signals caught since the last time, in order; then $k (and every other waiter)
Subroutine run_pending: called CC=3 SCAR=11.1
Pod undocumented
165 8 my ($c, $k) = @_; my $sh = $c->{sh};
166 8 ▶ push @{$sh->{twait}}, $k if $k; return if $sh->{tbusy}; $sh->{tbusy} = 1;
Branch: 2 branches
BranchTrueFalseTotal
if $k 8 0 8
if $sh->{"tbusy"} 0 8 8
167 16 ▶ sub { my $p = $sh->{pend};
Subroutine __ANON__: called CC=5 SCAR=16.2
168 16 ▶ return run_trap($c, shift @$p, __SUB__) if $p && @$p;
Branch: 1 branch
BranchTrueFalseTotal
if $p and @$p 8 8 16
Condition66%2/3
$p and @$p
!ll&&!rl&&r
088
MC/DC50%1/2
$p and @$p
$p @$p
Truth table66%2/3
A and B
A= $pB= @$p
ABresult
0X0
100
111
169 8 ▶ $sh->{tbusy} = 0; my @w = @{$sh->{twait} // []}; $sh->{twait} = []; $_->() for @w }->() }
Condition50%1/2
$sh->{"twait"} // []
l!l
80
MC/DC0%0/1
$sh->{"twait"} // []
$sh->{"twait"}
Truth table50%1/2
A
A= $sh->{"twait"}
Aresult
11
00
170 15 ▶sub run_trap { # a trap's action; $? is kept
Subroutine run_trap: called CC=4 SCAR=16.3
Pod undocumented
171 15 my ($c, $s, $k) = @_; my $a = $c->{sh}{trap}{$s}; my $q = $c->{sh}{q};
172 15 ▶ return $k && $k->(0) unless defined $a && $a ne '';
Branch: 1 branch
BranchTrueFalseTotal
unless defined $a and $a ne "" 0 15 15
Condition16%1/6
defined $a and $a ne ""
!ll&&!rl&&r
0015
$k && &$k(0)
!ll&&!rl&&r
000
MC/DC0%0/2
defined $a and $a ne ""
defined $a $a ne ""
MC/DC0%0/2
$k && &$k(0)
$k &$k(0)
Truth table33%1/3
A and B
A= defined $aB= $a ne ""
ABresult
0X0
100
111
Truth table0%0/3
A && B
A= $kB= &$k(0)
ABresult
0X0
100
111
173 15 ▶ run_text({ %$c, loops => [], held => 0, intrap => 1 }, $a, "the action of 'trap'", sub { $c->{sh}{q} = $q; $k->(0) if $k }) }
Subroutine __ANON__: called CC=2 SCAR=7.1
Branch: 1 branch
BranchTrueFalseTotal
if $k 15 0 15
174  
175 12 ▶sub b_wait {
Subroutine b_wait: called CC=7 SCAR=19.5
Pod undocumented
176 12 my ($c, $argv, $env, $k) = @_; my @pid = @$argv[1 .. $#$argv]; my @j = @{$c->{sh}{jobl}};
177 12 ▶ if (@pid) {
Branch: 1 branch
BranchTrueFalseTotal
if (@pid) 1 11 12
178 1 ▶ my $p = $pid[-1]; my ($j) = grep +($_->{first} // '') eq $p, @j;
Condition50%1/2
$_->{"first"} // ""
l!l
10
MC/DC0%0/1
$_->{"first"} // ""
$_->{"first"}
Truth table50%1/2
A
A= $_->{"first"}
Aresult
11
00
179 1 ▶ return ProcSS::defer($k, 127) unless $j;
Branch: 1 branch
BranchTrueFalseTotal
unless $j 0 1 1
180 1 ▶ return ProcSS::defer($k, $j->{st}) if defined $j->{st};
Branch: 1 branch
BranchTrueFalseTotal
if defined $j->{"st"} 0 1 1
181 1 ▶ return push @{$j->{waiters}}, sub { ProcSS::defer($k, $j->{st}) } }
Subroutine __ANON__: called CC=1 SCAR=0.0
182 11 my @left = grep !defined $_->{st}, @j; my $n = @left;
183 11 ▶ return ProcSS::defer($k, 0) unless $n;
Branch: 1 branch
BranchTrueFalseTotal
unless $n 2 9 11
184 9 ▶ push @{$_->{waiters}}, sub { ProcSS::defer($k, 0) unless --$n } for @left }
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless --$n 9 1 10
185  
186 20 ▶sub b_umask {
Subroutine b_umask: called CC=10 SCAR=23.9
Pod undocumented
187 20 my ($c, $argv, $env, $k) = @_;
188 20 ▶ return ProcSS::put($c, 1, sprintf("%04o\n", $c->{sh}{umask}), ProcSS::done($k, 0)) unless defined(my $m = $argv->[1]);
Branch: 1 branch
BranchTrueFalseTotal
unless defined(my $m = $argv->[1]) 12 8 20
189 8 ▶ if ($m eq '-S') { # umask -S (parser item P4): u=rwx,g=rx,o=rx
Branch: 1 branch
BranchTrueFalseTotal
if ($m eq "-S") 0 8 8
190 0 my $u = $c->{sh}{umask};
191 0 my @w = map { my $b = 7 & ~($u >> $_); join '', grep $b & {r => 4, w => 2, x => 1}->{$_}, qw(r w x) } 6, 3, 0;
192 0 return ProcSS::put($c, 1, "u=$w[0],g=$w[1],o=$w[2]\n", ProcSS::done($k, 0)) }
193 8 ▶ if ($m =~ /^[ugoa]*[-+=]/) { # symbolic, as both shells (post4-0.03): on the permissions the mask leaves
Branch: 1 branch
BranchTrueFalseTotal
if ($m =~ /^[ugoa]*[-+=]/) 3 5 8
194 3 my $p = ~$c->{sh}{umask} & 0777;
195 3 for (split /,/, $m) { my ($who, $op, $perm) = /^([ugoa]*)([-+=])([rwx]*)\z/;
196 4 ▶ my $w = 0; $w |= { u => 0700, g => 070, o => 07, a => 0777 }->{$_} for split //, $who || 'a';
Condition50%1/2
$who || 'a'
l!l
40
MC/DC0%0/1
$who || 'a'
$who
Truth table50%1/2
A
A= $who
Aresult
11
00
197 4 my $b = 0; $b |= { r => 0444, w => 0222, x => 0111 }->{$_} for split //, $perm; $b &= $w;
198 4 ▶ $p = $op eq '+' ? $p | $b : $op eq '-' ? $p & ~$b : ($p & ~$w) | $b }
Branch: 2 branches
BranchTrueFalseTotal
$op eq '+' ? : 1 3 4
$op eq '-' ? : 1 2 3
199 3 $c->{sh}{umask} = ~$p & 0777; return ProcSS::defer($k, 0) }
200 5 $c->{sh}{umask} = oct $m; ProcSS::defer($k, 0) }
201  
202 212 our $DEFPATH = '/usr/bin:/bin'; # command -p: bash's (glibc confstr _CS_PATH, in its order); dash adds /usr/sbin:/sbin
203 212 my %ASPROG = map +($_ => 1), qw(echo printf test [ kill true false pwd cd); # command -v prints the name (spec, section 5)
204 22 ▶sub b_pwd { # X23 (the user's choice C, post2-0.03): the program, as '/bin/pwd -L', with PWD set to the shell's own
Subroutine b_pwd: called CC=4 SCAR=13.9
Pod undocumented
205 # directory, so that it prints what both shells print (the directory as reached, also through symbolic links);
206 # operands are dropped, as both shells ignore them (the program would warn); options as given, the last counts
207 22 my ($c, $argv, $env, $k) = @_; my (undef, @a) = @$argv; my @o;
208 22 ▶ while (@a && $a[0] =~ /^-/) { my $o = shift @a; last if $o eq '--'; push @o, $o }
Branch: 2 branches
BranchTrueFalseTotal
if (@a and $a[0] =~ /^-/) 7 22 29
if $o eq "--" 0 7 7
Condition100%3/3
@a and $a[0] =~ /^-/
!ll&&!rl&&r
2117
MC/DC100%2/2
@a and $a[0] =~ /^-/
@a $a[0] =~ /^-/
Truth table100%3/3
A and B
A= @aB= $a[0] =~ /^-/
ABresult
0X0
100
111
209 22 ProcSS::spawn($c, $c->{map}, ['pwd', '-L', @o], { %$env, PWD => $c->{sh}{cwd} }, $k) }
210 43 ▶sub b_test { # rule F (post3-0.04): 's1 < s2', 's1 > s2' (also after '!'), which the program refuses, compared here by
Subroutine b_test: called CC=11 SCAR=24.2
Pod undocumented
211 # bytes, as both shells (POSIX 2024: "collates before/after ... in the current locale"; the same in the C locale);
212 # every other form: the program, as before (P5)
213 43 my ($c, $argv, $env, $k) = @_; my ($n, @a) = @$argv;
214 43 ▶ if ($n eq '[') { return ProcSS::spawn($c, $c->{map}, $argv, $env, $k) unless @a && $a[-1] eq ']'; pop @a }
Branch: 2 branches
BranchTrueFalseTotal
if ($n eq "[") 36 7 43
unless @a and $a[-1] eq "]" 0 36 36
Condition33%1/3
@a and $a[-1] eq "]"
!ll&&!rl&&r
0036
MC/DC0%0/2
@a and $a[-1] eq "]"
@a $a[-1] eq "]"
Truth table33%1/3
A and B
A= @aB= $a[-1] eq "]"
ABresult
0X0
100
111
215 43 ▶ my $not = @a == 4 && $a[0] eq '!' and shift @a;
Branch: 1 branch
BranchTrueFalseTotal
my $not = @a == 4 && $a[0] eq "!" and shift @a 1 42 43
Condition66%2/3
@a == 4 && $a[0] eq '!'
!ll&&!rl&&r
4201
MC/DC50%1/2
@a == 4 && $a[0] eq '!'
@a == 4 $a[0] eq '!'
Truth table66%2/3
A && B
A= @a == 4B= $a[0] eq '!'
ABresult
0X0
100
111
216 43 ▶ return ProcSS::spawn($c, $c->{map}, $argv, $env, $k) unless @a == 3 && $a[1] =~ /^[<>]\z/;
Branch: 1 branch
BranchTrueFalseTotal
unless @a == 3 and $a[1] =~ /^[<>]\z/ 39 4 43
Condition100%3/3
@a == 3 and $a[1] =~ /^[<>]\z/
!ll&&!rl&&r
8314
MC/DC100%2/2
@a == 3 and $a[1] =~ /^[<>]\z/
@a == 3 $a[1] =~ /^[<>]\z/
Truth table100%3/3
A and B
A= @a == 3B= $a[1] =~ /^[<>]\z/
ABresult
0X0
100
111
217 4 ▶ my $r = $a[1] eq '<' ? $a[0] lt $a[2] : $a[0] gt $a[2]; $r = !$r if $not;
Branch: 2 branches
BranchTrueFalseTotal
$a[1] eq '<' ? : 3 1 4
if $not 1 3 4
218 4 ▶ ProcSS::defer($k, $r ? 0 : 1) }
Branch: 1 branch
BranchTrueFalseTotal
$r ? : 2 2 4
219 21 ▶sub b_command {
Subroutine b_command: called CC=27 SCAR=34.3
Pod undocumented
220 21 my ($c, $argv, $env, $k) = @_; my (undef, @a) = @$argv;
221 21 ▶ if (($a[0] // '') eq '-v') {
Branch: 1 branch
BranchTrueFalseTotal
if (($a[0] // "") eq "-v") 13 8 21
Condition50%1/2
$a[0] // ""
l!l
210
MC/DC0%0/1
$a[0] // ""
$a[0]
Truth table50%1/2
A
A= $a[0]
Aresult
11
00
222 13 ▶ return unsupported($c, "'command -v' with " . (@a - 1) . " names") if @a != 2; # X53: as the parser (one name)
Branch: 1 branch
BranchTrueFalseTotal
if @a != 2 1 12 13
223 12 ▶ my $n = $a[1] // ''; my $sh = $c->{sh};
Condition50%1/2
$a[1] // ""
l!l
120
MC/DC0%0/1
$a[1] // ""
$a[1]
Truth table50%1/2
A
A= $a[1]
Aresult
11
00
224 return ProcSS::put($c, 1, "$n\n", ProcSS::done($k, 0))
225 if $sh->{cmd}{$n} || (ProcSS::cmd_of($n) // ['unsupported'])->[0] !~ /unsupported/
226 12 ▶ || $Proc::ShellSpawn::SPECIAL{$n} || $ASPROG{$n} || $Proc::ShellSubset::BI{$n};
Branch: 1 branch
BranchTrueFalseTotal
if $sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/ or $Proc::ShellSpawn::SPECIAL{$n} or $ASPROG{$n} or $Proc::ShellSubset::BI{$n} 7 5 12
Condition85%12/14
$sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/ or $Proc::ShellSpawn::SPECIAL{$n} or $ASPROG{$n} or $Proc::ShellSubset::BI{$n}
l!l&&r!l&&!r
705
$sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/ or $Proc::ShellSpawn::SPECIAL{$n} or $ASPROG{$n}
l!l&&r!l&&!r
345
$sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/ or $Proc::ShellSpawn::SPECIAL{$n}
l!l&&r!l&&!r
309
$sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/
l!l&&r!l&&!r
129
Proc::ShellSpawn::cmd_of($n) // ["unsupported"]
l!l
29
MC/DC0%0/5
$sh->{"cmd"}{$n} or not +(Proc::ShellSpawn::cmd_of($n) // ["unsupported"])->[0] =~ /unsupported/ or $Proc::ShellSpawn::SPECIAL{$n} or $ASPROG{$n} or $Proc::ShellSubset::BI{$n}
$sh->{"cmd"}{$n} Proc::ShellSpawn::cmd_of($n) $Proc::ShellSpawn::SPECIAL{$n} $ASPROG{$n} $Proc::ShellSubset::BI{$n}
Truth table16%1/6
A or not(B) or C or D or E
A= $sh->{"cmd"}{$n}B= Proc::ShellSpawn::cmd_of($n)C= $Proc::ShellSpawn::SPECIAL{$n}D= $ASPROG{$n}E= $Proc::ShellSubset::BI{$n}
ABCDEresult
1XXXX1
00XXX1
011XX1
0101X1
010011
010000
227 5 my ($p) = ProcSS::find_cmd($c, $n, ProcSS::var($c, 'PATH'));
228 5 ▶ $p //= $n if $Proc::ShellSpawn::INPROC{$n}; # run inside this process, no file (Windows): its name, as for a builtin
Branch: 1 branch
BranchTrueFalseTotal
if $Proc::ShellSpawn::INPROC{$n} 0 5 5
Condition0%0/3
$p //= $n
l!l&&r!l&&!r
000
MC/DC0%0/2
$p //= $n
$p $n
Truth table0%0/3
A //= B
A= $pB= $n
ABresult
1X1
011
000
229 5 ▶ return ProcSS::defer($k, 127) unless defined $p;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $p 2 3 5
230 3 return ProcSS::put($c, 1, "$p\n", ProcSS::done($k, 0)) }
231 8 ▶ return ProcSS::defer($k, 0) unless @a;
Branch: 1 branch
BranchTrueFalseTotal
unless @a 0 8 8
232 # X53: the forms the parser refuses (another option, -v with more than one name, -p with an option after it), when
233 # only expansions make them: outside the subset at run time (A4), not a program named -n
234 8 ▶ return unsupported($c, "'command " . ($a[0] eq '-p' ? "-p $a[1]" : $a[0]) . "'")
Branch: 2 branches
BranchTrueFalseTotal
if $a[0] =~ /^-/ and $a[0] ne "-p" or $a[0] eq "-p" and ($a[1] // "") =~ /^-/ 2 6 8
$a[0] eq '-p' ? : 1 1 2
Condition90%10/11
$a[0] =~ /^-/ and $a[0] ne "-p" or $a[0] eq "-p" and ($a[1] // "") =~ /^-/
l!l&&r!l&&!r
116
$a[0] =~ /^-/ and $a[0] ne "-p"
!ll&&!rl&&r
521
$a[0] eq "-p" and ($a[1] // "") =~ /^-/
!ll&&!rl&&r
511
$a[1] // ""
l!l
20
MC/DC25%1/4
$a[0] =~ /^-/ and $a[0] ne "-p" or $a[0] eq "-p" and ($a[1] // "") =~ /^-/
$a[0] =~ /^-/ $a[0] ne "-p" $a[0] eq "-p" $a[1]
Truth table42%3/7
A and B or C and D
A= $a[0] =~ /^-/B= $a[0] ne "-p"C= $a[0] eq "-p"D= $a[1]
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
235 if $a[0] =~ /^-/ && $a[0] ne '-p' || $a[0] eq '-p' && ($a[1] // '') =~ /^-/;
236 6 ▶ if ($a[0] eq '-p') { # command -p PROGRAM ... (parser item P4): looked up in a default PATH, run with the PATH it has
Branch: 1 branch
BranchTrueFalseTotal
if ($a[0] eq "-p") 1 5 6
237 1 shift @a; return (ProcSS::cmd_of($a[0]) // [''])->[0] !~ /b_test\z|^\z/ || $c->{sh}{cmd}{$a[0]}
238 ? unsupported($c, "'command -p $a[0]'")
239 1 ▶ : ProcSS::spawn($c, $c->{map}, \@a, $env, $k, $DEFPATH) }
Branch: 1 branch
BranchTrueFalseTotal
!(+(Proc::ShellSpawn::cmd_of($a[0]) // [''])->[0] =~ /b_test\z|^\z/) || $c->{'sh'}{'cmd'}{$a[0]} ? : 0 1 1
Condition40%2/5
not +(Proc::ShellSpawn::cmd_of($a[0]) // [""])->[0] =~ /b_test\z|^\z/ or $c->{"sh"}{"cmd"}{$a[0]}
l!l&&r!l&&!r
001
Proc::ShellSpawn::cmd_of($a[0]) // [""]
l!l
01
MC/DC0%0/2
not +(Proc::ShellSpawn::cmd_of($a[0]) // [""])->[0] =~ /b_test\z|^\z/ or $c->{"sh"}{"cmd"}{$a[0]}
Proc::ShellSpawn::cmd_of($a[0]) $c->{"sh"}{"cmd"}{$a[0]}
Truth table0%0/3
not(A) or B
A= Proc::ShellSpawn::cmd_of($a[0])B= $c->{"sh"}{"cmd"}{$a[0]}
ABresult
0X1
111
100
240 5 ▶ return b_late($c, \@a, $env, $k) if $Proc::ShellSubset::REGBI{$a[0]}; # a builtin, not a function: its checks, then it (3A)
Branch: 1 branch
BranchTrueFalseTotal
if $Proc::ShellSubset::REGBI{$a[0]} 3 2 5
241 2 ▶ if (my $e = ProcSS::cmd_of($a[0])) { return ProcSS::handler($e->[0])->($c, \@a, $env, $k, $e->[1]) } # a builtin,
Branch: 1 branch
BranchTrueFalseTotal
if (my $e = Proc::ShellSpawn::cmd_of($a[0])) 1 1 2
242 # not a function
243 1 ProcSS::spawn($c, $c->{map}, \@a, $env, $k) }
244  
245 24 ▶sub b_getopts { # OPTSTRING NAME [ARGS]: as dash, also OPTIND inside grouped options (A5)
Subroutine b_getopts: called CC=19 SCAR=29.6
Pod undocumented
246 24 my ($c, $argv, $env, $k) = @_; my (undef, $os, $name, @a) = @$argv; my $sh = $c->{sh};
247 24 ▶ @a = @{$sh->{args}} unless @$argv > 3;
Branch: 1 branch
BranchTrueFalseTotal
unless @$argv > 3 2 22 24
248 24 my $silent = $os =~ s/^://;
249 24 ▶ my $ind = ProcSS::var($c, 'OPTIND'); $ind = 1 if $ind !~ /^[1-9][0-9]*\z/;
Branch: 1 branch
BranchTrueFalseTotal
unless $ind =~ /^[1-9][0-9]*\z/ 0 24 24
250 24 ▶ my $off = ($sh->{optlast} // 0) eq $ind ? $sh->{optoff} // 0 : 0;
Branch: 1 branch
BranchTrueFalseTotal
($sh->{'optlast'} // 0) eq $ind ? : 12 12 24
Condition75%3/4
$sh->{"optlast"} // 0
l!l
1212
$sh->{"optoff"} // 0
l!l
120
MC/DC100%1/1
$sh->{"optlast"} // 0
$sh->{"optlast"}
MC/DC0%0/1
$sh->{"optoff"} // 0
$sh->{"optoff"}
Truth table100%2/2
A
A= $sh->{"optlast"}
Aresult
11
00
Truth table50%1/2
A
A= $sh->{"optoff"}
Aresult
11
00
251 24 ▶ $ind = 1, $off = 0 if $ind > @a + 1; # past the end of these arguments: dash starts over (L7)
Branch: 1 branch
BranchTrueFalseTotal
if $ind > @a + 1 1 23 24
252 24 ▶ my $set = sub { my ($v, $st, @arg) = @_; # @arg undef: OPTARG unset (rule E: POSIX, as bash; dash keeps it, L8)
Subroutine __ANON__: called CC=6 SCAR=19.3
253 24 ▶ ProcSS::setvar($c, $name, $v) && ProcSS::setvar($c, OPTIND => $ind) or return;
Branch: 1 branch
BranchTrueFalseTotal
Proc::ShellSpawn::setvar($c, $name, $v) and Proc::ShellSpawn::setvar($c, "OPTIND", $ind) or return 24 0 24
Condition33%1/3
Proc::ShellSpawn::setvar($c, $name, $v) and Proc::ShellSpawn::setvar($c, "OPTIND", $ind)
!ll&&!rl&&r
0024
MC/DC0%0/2
Proc::ShellSpawn::setvar($c, $name, $v) and Proc::ShellSpawn::setvar($c, "OPTIND", $ind)
Proc::ShellSpawn::setvar($c, $name, $v) Proc::ShellSpawn::setvar($c, "OPTIND", $ind)
Truth table33%1/3
A and B
A= Proc::ShellSpawn::setvar($c, $name, $v)B= Proc::ShellSpawn::setvar($c, "OPTIND", $ind)
ABresult
0X0
100
111
254 24 ▶ !@arg ? () : defined $arg[0] ? ProcSS::setvar($c, OPTARG => $arg[0]) || return : delete $sh->{vars}{OPTARG};
Branch: 2 branches
BranchTrueFalseTotal
!@arg ? : 0 24 24
defined $arg[0] ? : 9 15 24
Condition50%1/2
Proc::ShellSpawn::setvar($c, "OPTARG", $arg[0]) or return
l!l
90
MC/DC0%0/1
Proc::ShellSpawn::setvar($c, "OPTARG", $arg[0]) or return
Proc::ShellSpawn::setvar($c, "OPTARG", $arg[0])
Truth table50%1/2
A
A= Proc::ShellSpawn::setvar($c, "OPTARG", $arg[0])
Aresult
11
00
255 24 @$sh{qw(optlast optoff)} = ($ind, $off); ProcSS::defer($k, $st) };
256 24 my $cur;
257 24 ▶ if ($off) { $cur = $a[$ind - 2] }
Branch: 1 branch
BranchTrueFalseTotal
if ($off) { } 1 23 24
258 else {
259 23 $cur = $a[$ind - 1];
260 23 ▶ return $set->('?', 1, undef) if !defined $cur || $cur !~ /^-./;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cur and $cur =~ /^-./ 6 17 23
Condition100%3/3
defined $cur and $cur =~ /^-./
!ll&&!rl&&r
4217
MC/DC100%2/2
defined $cur and $cur =~ /^-./
defined $cur $cur =~ /^-./
Truth table100%3/3
A and B
A= defined $curB= $cur =~ /^-./
ABresult
0X0
100
111
261 17 ▶ $ind++; return $set->('?', 1, undef) if $cur eq '--';
Branch: 1 branch
BranchTrueFalseTotal
if $cur eq "--" 0 17 17
262 17 $off = 1 }
263 18 ▶ my $ch = substr $cur, $off++, 1; my $last = $off >= length $cur; $off = 0 if $last;
Branch: 1 branch
BranchTrueFalseTotal
if $last 16 2 18
264 18 my $i = index $os, $ch;
265 18 ▶ if ($ch eq ':' or $i < 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ch eq ":" or $i < 0) 4 14 18
Condition66%2/3
$ch eq ":" or $i < 0
l!l&&r!l&&!r
0414
MC/DC50%1/2
$ch eq ":" or $i < 0
$ch eq ":" $i < 0
Truth table66%2/3
A or B
A= $ch eq ":"B= $i < 0
ABresult
1X1
011
000
266 4 ▶ return $silent ? $set->('?', 0, $ch) : ProcSS::msg($c, "Illegal option -$ch", sub { $set->('?', 0, undef) }) }
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
$silent ? : 2 2 4
267 14 ▶ return $set->($ch, 0, undef) unless substr($os, $i + 1, 1) eq ':'; # POSIX: OPTARG unset (rule E; dash: empty)
Branch: 1 branch
BranchTrueFalseTotal
unless substr($os, $i + 1, 1) eq ":" 6 8 14
268 8 ▶ unless ($last) { my $arg = substr $cur, $off; $off = 0; return $set->($ch, 0, $arg) }
Branch: 1 branch
BranchTrueFalseTotal
unless ($last) 1 7 8
269 7 ▶ return $set->($ch, 0, $a[$ind++ - 1]) if defined $a[$ind - 1];
Branch: 1 branch
BranchTrueFalseTotal
if defined $a[$ind - 1] 5 2 7
270 2 ▶ $silent ? $set->(':', 0, $ch) : ProcSS::msg($c, "No arg for -$ch option", sub { $set->('?', 0, undef) }) }
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
$silent ? : 1 1 2
271  
272 12 ▶sub b_unset {
Subroutine b_unset: called CC=8 SCAR=20.9
Pod undocumented
273 12 my ($c, $argv, $env, $k) = @_; my (undef, @n) = @$argv; my $sh = $c->{sh};
274 12 ▶ my $f = ($n[0] // '') =~ /^-([vf])\z/ && (shift @n, $1)[1] // 'v';
Condition57%4/7
($n[0] // "") =~ /^-([vf])\z/ && (shift @n, $1)[1] // "v"
l!l
120
($n[0] // "") =~ /^-([vf])\z/ and (shift @n, $1)[1]
!ll&&!rl&&r
804
$n[0] // ""
l!l
120
MC/DC0%0/2
($n[0] // "") =~ /^-([vf])\z/ && (shift @n, $1)[1] // "v"
$n[0] (shift @n, $1)[1]
Truth table33%1/3
A and B
A= $n[0]B= (shift @n, $1)[1]
ABresult
111
0X0
100
275 12 for (@n) {
276 13 ▶ if ($f eq 'f') { delete $sh->{cmd}{$_}; next }
Branch: 1 branch
BranchTrueFalseTotal
if ($f eq "f") 4 9 13
277 # X35 (the user, 2026-11-08: as dash): a word that is not a name, from an expansion (a literal one the parser
278 # rejects), stops the shell with status 2, as any error of a special builtin; the names before it are already unset
279 9 ▶ return ProcSS::fail($c, 2, "unset: $_: bad variable name") unless /^[A-Za-z_][A-Za-z0-9_]*\z/;
Branch: 1 branch
BranchTrueFalseTotal
unless /^[A-Za-z_][A-Za-z0-9_]*\z/ 4 5 9
280 5 ▶ return ProcSS::fail($c, 2, "unset: $_: is read only") if $sh->{ro}{$_};
Branch: 1 branch
BranchTrueFalseTotal
if $sh->{"ro"}{$_} 1 4 5
281 4 delete $sh->{vars}{$_}; delete $sh->{exp}{$_} }
282 7 ProcSS::defer($k, 0) }
283  
284 46 ▶sub b_kill { # kill ... $$: the shell takes the signal itself (F9); every other form goes to the program kill
Subroutine b_kill: called CC=21 SCAR=31.7
Pod undocumented
285 46 my ($c, $argv, $env, $k) = @_; my (undef, @a) = @$argv; my $sh = $c->{sh};
286 # JH4, part c (the user, 2026-11-14: way A, provisionally; X63): the options are read once: -s NAME, or one word of a
287 # dash with letters and digits that does not start with -l; then a '--'. $s: the signal; @ids: the process IDs
288 46 my ($s, @ids) = ('TERM', @a);
289 46 ▶ if (@ids && $ids[0] eq '-s') { shift @ids; $s = shift @ids }
Branch: 2 branches
BranchTrueFalseTotal
if (@ids and $ids[0] eq '-s') { } 4 42 46
elsif (@ids and $ids[0] =~ /^-([0-9A-Za-z]+)\z/ and not $ids[0] =~ /^-l/) { } 27 27 54
Condition100%3/3
@ids and $ids[0] eq "-s"
!ll&&!rl&&r
2404
MC/DC100%2/2
@ids and $ids[0] eq "-s"
@ids $ids[0] eq "-s"
Truth table100%3/3
A and B
A= @idsB= $ids[0] eq "-s"
ABresult
0X0
100
111
290 27 ▶ elsif (@ids && $ids[0] =~ /^-([0-9A-Za-z]+)\z/ && $ids[0] !~ /^-l/) { $s = $1; shift @ids }
Condition100%6/6
@ids and $ids[0] =~ /^-([0-9A-Za-z]+)\z/ and not $ids[0] =~ /^-l/
!ll&&!rl&&r
12327
@ids and $ids[0] =~ /^-([0-9A-Za-z]+)\z/
!ll&&!rl&&r
21030
MC/DC100%3/3
@ids and $ids[0] =~ /^-([0-9A-Za-z]+)\z/ and not $ids[0] =~ /^-l/
@ids $ids[0] =~ /^-([0-9A-Za-z]+)\z/ not $ids[0] =~ /^-l/
Truth table100%4/4
A and B and not(C)
A= @idsB= $ids[0] =~ /^-([0-9A-Za-z]+)\z/C= not $ids[0] =~ /^-l/
ABCresult
0XX0
10X0
1100
1111
291 46 ▶ my $dd = @ids && $ids[0] eq '--' ? shift @ids : undef;
Branch: 1 branch
BranchTrueFalseTotal
@ids && $ids[0] eq '--' ? : 1 45 46
Condition100%3/3
@ids and $ids[0] eq "--"
!ll&&!rl&&r
4411
MC/DC100%2/2
@ids and $ids[0] eq "--"
@ids $ids[0] eq "--"
Truth table100%3/3
A and B
A= @idsB= $ids[0] eq "--"
ABresult
0X0
100
111
292 # K0 (the user, 2026-11-05): a signal (-N, -NAME, -s NAME), maybe '--', and no process ID: as both shells, status 2,
293 # with dash's text (the program kill: status 1, a long usage text). 'kill -s' alone: the program
294 46 ▶ return ProcSS::msg($c, "kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or\nkill -l [exitstatus]", ProcSS::done($k, 2))
Branch: 1 branch
BranchTrueFalseTotal
if not @ids and join($", @a) ne "-s" 5 41 46
Condition66%2/3
not @ids and join($", @a) ne "-s"
!ll&&!rl&&r
4105
MC/DC50%1/2
not @ids and join($", @a) ne "-s"
not @ids join($", @a) ne "-s"
Truth table66%2/3
not(A) and B
A= not @idsB= join($", @a) ne "-s"
ABresult
0X0
100
111
295 if !@ids && "@a" ne '-s';
296 41 ▶ if (defined $s) { $s = $SIGNAME{$s} // $s if $s =~ /^[0-9]+\z/; $s =~ s/^SIG// }
Branch: 2 branches
BranchTrueFalseTotal
if (defined $s) 41 0 41
if $s =~ /^[0-9]+\z/ 4 37 41
Condition66%2/3
$SIGNAME{$s} // $s
l!l&&r!l&&!r
310
MC/DC0%0/2
$SIGNAME{$s} // $s
$SIGNAME{$s} $s
Truth table66%2/3
A // B
A= $SIGNAME{$s}B= $s
ABresult
1X1
011
000
297 # The shell takes the signal itself only when the signal is one that exists (0 is EXIT here), every word left is a
298 # number (a process ID, or a group's with '-') and $$ is among them. Every other form goes to the program kill as
299 # written: it refuses what is no signal or no process ID, and the shell goes on
300 return ProcSS::spawn($c, $c->{map}, $argv, $env, $k)
301 41 ▶ unless defined $s && ($s eq 'EXIT' || $SIGNUM{$s}) && !grep(!/^-?[0-9]+\z/, @ids) && grep $_ eq $sh->{pid}, @ids;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $s and $s eq "EXIT" || $Proc::ShellSpawn::Large::SIGNUM{$s} and not grep((!/^-?[0-9]+\z/), @ids) and grep(($_ eq $sh->{"pid"}), @ids) 16 25 41
Condition91%11/12
defined $s and $s eq "EXIT" || $Proc::ShellSpawn::Large::SIGNUM{$s} and not grep((!/^-?[0-9]+\z/), @ids) and grep(($_ eq $sh->{"pid"}), @ids)
!ll&&!rl&&r
13325
defined $s and $s eq "EXIT" || $Proc::ShellSpawn::Large::SIGNUM{$s} and not grep((!/^-?[0-9]+\z/), @ids)
!ll&&!rl&&r
31028
defined $s and $s eq "EXIT" || $Proc::ShellSpawn::Large::SIGNUM{$s}
!ll&&!rl&&r
0338
$s eq "EXIT" or $Proc::ShellSpawn::Large::SIGNUM{$s}
l!l&&r!l&&!r
3353
MC/DC80%4/5
defined $s and $s eq "EXIT" || $Proc::ShellSpawn::Large::SIGNUM{$s} and not grep((!/^-?[0-9]+\z/), @ids) and grep(($_ eq $sh->{"pid"}), @ids)
defined $s $s eq "EXIT" $Proc::ShellSpawn::Large::SIGNUM{$s} not grep((!/^-?[0-9]+\z/), @ids) grep(($_ eq $sh->{"pid"}), @ids)
Truth table62%5/8
A and B or C and not(D) and E
A= defined $sB= $s eq "EXIT"C= $Proc::ShellSpawn::Large::SIGNUM{$s}D= not grep((!/^-?[0-9]+\z/), @ids)E= grep(($_ eq $sh->{"pid"}), @ids)
ABCDEresult
0XXXX0
100XX0
11X0X0
1010X0
11X100
101100
11X111
101111
302 25 my $harmless = $s =~ /^(?:CHLD|CLD|URG|WINCH|CONT)\z/; # post4-0.04: by default these do nothing to the shell (0 is EXIT here)
303 25 my @other = grep $_ ne $sh->{pid}, @ids;
304 25 ▶ my $m = $sh->{main} // $sh; # $$ is the main shell, also in a subshell: its trap counts (L6)
Condition66%2/3
$sh->{"main"} // $sh
l!l&&r!l&&!r
9160
MC/DC0%0/2
$sh->{"main"} // $sh
$sh->{"main"} $sh
Truth table66%2/3
A // B
A= $sh->{"main"}B= $sh
ABresult
1X1
011
000
305 25 ▶ my $self = sub {
Subroutine __ANON__: called CC=13 SCAR=27.7
306 25 my $t = $m->{trap}{$s};
307 25 ▶ return ProcSS::defer($k, 0) if $s eq 'EXIT' || $harmless && !defined $t; # kill -0 $$ only tests; as both shells, status 0
Branch: 1 branch
BranchTrueFalseTotal
if $s eq "EXIT" or $harmless and not defined $t 6 19 25
Condition83%5/6
$s eq "EXIT" or $harmless and not defined $t
l!l&&r!l&&!r
3319
$harmless and not defined $t
!ll&&!rl&&r
1903
MC/DC66%2/3
$s eq "EXIT" or $harmless and not defined $t
$s eq "EXIT" $harmless not defined $t
Truth table75%3/4
A or B and not(C)
A= $s eq "EXIT"B= $harmlessC= not defined $t
ABCresult
1XX1
0111
00X0
0100
308 19 ▶ return ProcSS::defer($k, 0) if defined $t && $t eq ''; # ignored
Branch: 1 branch
BranchTrueFalseTotal
if defined $t and $t eq "" 2 17 19
Condition100%3/3
defined $t and $t eq ""
!ll&&!rl&&r
2152
MC/DC100%2/2
defined $t and $t eq ""
defined $t $t eq ""
Truth table100%3/3
A and B
A= defined $tB= $t eq ""
ABresult
0X0
100
111
309 17 ▶ return ProcSS::defer($k, 0) if $Proc::ShellSpawn::IGN0{$s}; # X49: ignored on entry, so no trap: nothing, as both shells
Branch: 1 branch
BranchTrueFalseTotal
if $Proc::ShellSpawn::IGN0{$s} 2 15 17
310 15 ▶ return run_trap($c, $s, sub { ProcSS::defer($k, 0) }) if defined $t && $m == $sh;
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if defined $t and $m == $sh 7 8 15
Condition66%2/3
defined $t and $m == $sh
!ll&&!rl&&r
087
MC/DC50%1/2
defined $t and $m == $sh
defined $t $m == $sh
Truth table66%2/3
A and B
A= defined $tB= $m == $sh
ABresult
0X0
100
111
311 8 ▶ if (defined $t) { my $h = $m->{tsub}{$s}; $h->($s) if $h; return ProcSS::defer($k, 0) } # as a real signal:
Branch: 2 branches
BranchTrueFalseTotal
if (defined $t) 8 0 8
if $h 8 0 8
312 # the trap runs in the main shell
313 0 ▶ $m->{trap}{EXIT} = '' if exists $m->{trap}{EXIT}; # a death by the signal runs no EXIT trap
Branch: 1 branch
BranchTrueFalseTotal
if exists $m->{"trap"}{"EXIT"} 0 0 0
314 0 $Proc::ShellSpawn::SIGNALLED = $s; # the caller may die by it too (try.pl does)
315 0 ▶ $sh->{die}->(128 + ($SIGNUM{$s} // 15)) }; # the whole string ends, as sh -c would
Condition0%0/2
$Proc::ShellSpawn::Large::SIGNUM{$s} // 15
l!l
00
MC/DC0%0/1
$Proc::ShellSpawn::Large::SIGNUM{$s} // 15
$Proc::ShellSpawn::Large::SIGNUM{$s}
Truth table0%0/2
A
A= $Proc::ShellSpawn::Large::SIGNUM{$s}
Aresult
11
00
316 25 ▶ return $self->() unless @other;
Branch: 1 branch
BranchTrueFalseTotal
unless @other 25 0 25
317 0 ▶ ProcSS::spawn($c, $c->{map}, ['kill', "-$s", (defined $dd ? '--' : ()), @other], $env, sub { $self->() }) }
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
defined $dd ? : 0 0 0
318  
319 212 1;
« lib/Proc/ShellSubset/Small.pm ↑ Summary lib/Proc/ShellSpawn/Builtins.pm »