Branch Coverage

File:bin/class-shared
Coverage:82.8%

line%coveragebranch
56100TFunless $options_ok
58100TFif ($opt{'version'})
65100TFif ($opt{'help'} or $command eq "help")
69100TFif ($command eq 'start') { }
100TFelsif ($command eq 'status') { }
100TFelsif ($command eq 'stop') { }
100TFelsif ($command eq 'path') { }
90100TFif defined $opt{'max_memory'}
9250TFunless eval {         do {         require Class::Shared::Backend; 1 } }
104100TFdefined $host ? :
100TF$opt{'foreground'} ? :
108100TFunless ($backend)
11650TFunless ($ok)
127100TFunless $response
12850TFunless $response->{'ok'}
13950TFunless ref $classes eq "ARRAY"
141100TF@{$classes;} ? :
156100TFunless $response
15750TFunless $response->{'ok'}
16850TFif defined $opt{'listen'} or defined $opt{'host'} or defined $opt{'port'}
183100TFunless $mib > 0
187100TFif delete $ENV{'CLASS_SHARED_MEMORY_CAPPED'}
19150TFunless $^O eq "linux" or $^O eq "freebsd"
1960TFunless exec "/bin/sh", "-c", "ulimit -v \"\$1\" && shift && exec \"\$\@\"", "sh", $mib * 1024, $^X, map({"-I$_";} grep({not ref $_;} @INC)), $0, @command_line
206100TFif (defined $opt{'listen'})
20750TFif defined $host or defined $port
212100TFif ($opt{'listen'} =~ /\Atcp:(.+):(\d+)\z/a) { }
50TFelsif ($opt{'listen'} =~ /\Aunix:(.+)\z/) { }
221100TFif defined $host xor defined $port
225100TFif defined $host and defined $opt{'socket'} and length $opt{'socket'}
237100TFdefined $opt{'socket'} && length $opt{'socket'} ? :
239100TFunless defined $path
24550TFif defined $opt{'log'} and length $opt{'log'}
251100TFunless defined $opt{'token_file'} and length $opt{'token_file'}
256100TFunless defined $host
267100TFunless (defined $host)
26950TFif defined $tls{$_}
50TFif grep {length $tls{$_} if defined $tls{$_};} keys %tls
273100TFif ($role eq "server")
27650TFif defined $tls{'tls_fingerprint'} and length $tls{'tls_fingerprint'}
280100TFif grep {not defined $tls{$_} && length $tls{$_};} "tls_cert", "tls_key", "tls_ca"
289100TFif grep {not defined $tls{$_} && length $tls{$_};} "tls_cert", "tls_key"
29450TFunless $has_ca or $has_pin
298100TFif $has_ca and $has_pin
302100TFif ($has_pin) { }
318100TFunless defined $value
332100TFif (defined $host) { }
349100TFunless ($sock)
35150TFunless defined $why and length $why
359100TFif (-e $where)
361100TFunless $safe
365100TFunless $sock
374100TFunless ($hello)
380100TFif (defined $host and defined $hello_error and $hello_error =~ /closed by peer|read failed|write failed/)
394100TFunless (defined $secret)
404100TFunless ($hello->{'ok'})
41250TFunless $response
42150TFunless defined $bytes
424100TFunless ($ok)
42850TFif ($request->{'op'} eq "hello")
430100TFif ref $refusal eq "HASH" and not $refusal->{'ok'}
437100TFunless defined $response
444100TFif defined $host
45350TFif -e $socket
468100TFunless (print {*STDOUT;} $text and "STDOUT"->flush)
47850TFunless close $sock
48550TFunless defined $message