Branch Coverage

blib/lib/Net/OpenSSH/Parallel.pm
Criterion Covered Total %
branch 0 330 0.0


line true false branch
27 0 0 if ($max_conns)
28 0 0 if ($max_workers) { }
29 0 0 if $max_conns < $max_workers
37 0 0 if %opts
73 0 0 unless my $bit = $debug_channel{$channel}
75 0 0 if ($debug & $debug_channel{$channel})
77 0 0 defined $_ ? :
84 0 0 if $label =~ m[([,*!()<>/{}])]
85 0 0 @_ & 1 ? :
86 0 0 unless defined $opts{'host'}
87 0 0 unless defined $opts{'batch_mode'}
103 0 0 if $debug
105 0 0 if $debug
112 0 0 unless delete $self->{'in_state'}{$old}{$label}
114 0 0 if $old eq 'suspended' or $old eq 'waiting' or $old eq 'join_failed'
119 0 0 if $debug
121 0 0 if ($host->{'ssh'} and $state eq 'suspended' || $state eq 'waiting' || $state eq 'join_failed')
125 0 0 if $debug
149 0 0 if $debug
180 0 0 if (ref $action eq 'CODE')
186 0 0 if defined $alias
188 0 0 unless $action =~ /^(?:command|(?:(?:rsync|scp)_(?:get|put))|join|sub|parsub|here|stop|goto|_notify|connect)$/
191 0 0 $action ne 'sub' && ref $_[0] eq 'HASH' ? :
192 0 0 if %opts and grep(($action eq $_), ('join', 'here'))
198 0 0 if defined $max and $max < @_
202 0 0 if defined $min and $min > @_
205 0 0 if ($action eq 'join') { }
211 0 0 unless (my(@depends) = $self->push($notify_selector, '_notify', {}, $join))
220 0 0 if $debug
222 0 0 if $in_state->{'done'}{$label}
229 0 0 if $debug
231 0 0 if $in_state->{'done'}{$label}
242 0 0 if $debug
244 0 0 unless $num == $self->{'num_conns'}
257 0 0 if (defined $_)
259 0 0 if defined $v
271 0 0 if $debug
274 0 0 if $task
277 0 0 if ($error == 1)
278 0 0 if ($host->{'state'} eq 'connecting')
280 0 0 if $task
281 0 0 if @$queue
285 0 0 if $debug
286 0 0 if ($reconnections < $max_reconnections)
287 0 0 if $debug
293 0 0 if (ref $on_error eq 'CODE')
294 0 0 if ($error == 100) { }
302 0 0 if not defined $on_error or $error == 101
305 0 0 if $debug
307 0 0 if ($on_error == 205)
308 0 0 if ($error == 1) { }
0 0 elsif ($error == 102) { }
327 0 0 if ($on_error == 201) { }
328 0 0 if ($error == 1) { }
332 0 0 unless $task
343 0 0 unless ($on_error == 202 or $on_error == 203 or $on_error == 204)
351 0 0 if $debug
354 0 0 if $debug
355 0 0 if $action eq '_notify'
360 0 0 if $on_error == 204
371 0 0 if $debug
372 0 0 if $host->{'ssh'}
382 0 0 if ($ssh->error)
390 0 0 if $debug
392 0 0 if ($ssh->wait_for_master(1)) { }
0 0 elsif ($ssh->error) { }
393 0 0 if $debug
405 0 0 unless delete $join->{'depends'}{$label}
407 0 0 if $debug
408 0 0 if $failed
409 0 0 if (not %{$join->{'depends'};})
410 0 0 if $debug
414 0 0 if $debug
415 0 0 $failed ? :
432 0 0 unless $state =~ /^(?:waiting|suspended|done|connecting)$/
434 0 0 if ($host->{'ssh'})
435 0 0 if $debug
437 0 0 if defined $master_pid
448 0 0 if $debug
454 0 0 if $debug
457 0 0 if defined $label
459 0 0 if $debug
460 0 0 unless defined $label
468 0 0 if (my $max_workers = $self->{'max_workers'})
471 0 0 if $debug
472 0 0 if ($num_workers > $max_workers)
473 0 0 if $debug
480 0 0 if $debug
484 0 0 if ($self->{'abort_all'})
491 0 0 if $debug
492 0 0 if ($action eq 'join') { }
0 0 elsif ($action eq 'here') { }
0 0 elsif ($action eq 'stop') { }
0 0 elsif ($action eq 'goto') { }
0 0 elsif ($action eq '_notify') { }
0 0 elsif ($action eq 'sub') { }
494 0 0 if ($join->{'done'})
495 0 0 if $debug
496 0 0 if ($join->{'failed'})
500 0 0 if $debug
529 0 0 if $debug
535 0 0 unless ($action eq 'parsub' and $task->[0]{'no_ssh'})
536 0 0 unless ($ssh)
540 0 0 if (my $max_conns = $self->{'max_conns'})
541 0 0 if $self->{'num_conns'} >= $max_conns
543 0 0 if $debug
548 0 0 if (my $error = $ssh->error)
554 0 0 if $action eq 'connect'
559 0 0 unless my $method = $self->can("_start_$action")
562 0 0 if $debug
563 0 0 unless (defined $pid)
576 0 0 if $debug
587 0 0 if $debug
589 0 0 unless ($pid)
590 0 0 unless defined $pid
592 0 0 if $@ and $debug
593 0 0 $@ ? :
603 0 0 if $debug
612 0 0 if $debug
622 0 0 if $debug
632 0 0 if $debug
642 0 0 if $debug
656 0 0 if $debug
661 0 0 if $task->[0] eq 'here' and $task->[2] eq $target
663 0 0 if ($task or $target eq 'END')
666 0 0 if $task->[0] eq '_notify'
671 0 0 if $debug
679 0 0 if (defined $label) { }
680 0 0 if $debug
683 0 0 if ($?)
686 0 0 unless my $ssh = $host->{'ssh'}
688 0 0 unless $error or $rc == 255
689 0 0 if (defined $or_goto) { }
690 0 0 if $debug
700 0 0 if defined $or_goto
706 0 0 unless defined $label
708 0 0 if $debug
711 0 0 unless my $ssh = $host->{'ssh'}
722 0 0 if $debug
727 0 0 if (%{$self->{'in_state'}{'running'};})
728 0 0 if $debug
731 0 0 if $pid <= 0
732 0 0 if $debug
737 0 0 if $dontwait
738 0 0 if $debug
767 0 0 if $debug
769 0 0 if $debug
772 0 0 if $debug
778 0 0 if $debug
781 0 0 if ($max_workers)
782 0 0 if $debug
783 0 0 if (%$suspended)
788 0 0 unless my($label) = each %$hash
793 0 0 if $debug
801 0 0 if $debug
802 0 0 if $debug
803 0 0 if $debug
805 0 0 if keys %$hosts == keys %$done
807 0 0 %$connecting ? :
0 0 %$ready ? :
817 0 0 if $hosts->{$label}{'error'}
818 0 0 if $debug
825 0 0 unless my $host = $self->{'hosts'}{$label}
832 0 0 if (wantarray) { }
835 0 0 defined $error ? :