Branch Coverage

blib/lib/Algorithm/Classifier/IsolationForest/App/Command/streamc.pm
Criterion Covered Total %
branch 72 98 73.4


line true false branch
105 1 22 if (defined $opt->{'set'} and not $opt->{'set'} =~ /\A[A-Za-z0-9+\-@_]+\z/)
112 10 12 if (defined $opt->{'i'}) { }
2 10 elsif (scalar @cmds != 1) { }
113 0 10 if (scalar @cmds)
121 10 10 if (defined $opt->{'i'} and $opt->{'i'} ne "-")
122 0 10 if (not -f $opt->{'i'}) { }
0 10 elsif (not -r $opt->{'i'}) { }
129 0 1 if (defined $opt->{'o'} and not $opt->{'w'} and -e $opt->{'o'})
133 0 20 unless ($opt->{'mode'} =~ /\A(?:prequential|learn|score)\z/)
137 1 1 if ($opt->{'d'} and $opt->{'jsonl'})
141 0 19 if ($opt->{'json'} and defined $opt->{'i'})
145 0 19 if ($opt->{'batch'} < 1)
149 0 19 if ($opt->{'timeout'} < 1)
162 0 19 unless eval { do { require JSON::MaybeXS; 1 } }
171 18 1 if (defined $opt->{'set'}) { }
172 18 0 defined $opt->{'socket'} ? :
175 1 0 defined $opt->{'socket'} ? :
177 0 19 if length $socket > 100
190 0 1 defined $opt->{'set'} ? :
1 18 unless $SOCK = "IO::Socket::UNIX"->new("Peer", $socket)
198 9 9 unless defined $opt->{'i'}
210 0 20 unless defined $reply
220 0 20 if $left <= 0 or not $sel->can_read($left)
222 0 20 unless $got
228 0 20 if $@
244 1 8 if defined $reply->{'error'}
246 1 7 if ($opt->{'json'})
252 5 2 if (ref $ok eq 'HASH') { }
254 28 1 defined $ok->{$k} ? :
257 2 0 defined $ok ? :
270 0 9 if ($opt->{'i'} eq '-') { }
273 0 9 unless open $in_fh, "<", $opt->{'i'}
281 5 22 if (defined $opt->{'o'}) { }
292 1 11 unless @rows
295 1 10 if (defined $reply->{'error'})
300 1 0 if ($err =~ s/\Arow (\d+): //)
305 9 1 if ($opt->{'mode'} ne "learn")
306 2 7 if ($opt->{'jsonl'}) { }
311 5 20 $opt->{'d'} ? :
324 0 92 if ($line =~ /^\s*$/)
330 4 88 if ($opt->{'jsonl'}) { }
332 0 4 if $@
333 0 4 unless ref $row eq "ARRAY" or ref $row eq "HASH"
338 7 81 if (not defined $expected_cols) { }
1 80 elsif (scalar @fields != $expected_cols) { }
340 0 7 if $expected_cols < 1
353 174 0 if (&looks_like_number($_)) { }
357 4 87 if scalar @rows >= $opt->{'batch'}
361 1 6 if (defined $opt->{'o'})