Branch Coverage

blib/lib/File/Rsync.pm
Criterion Covered Total %
branch 101 188 53.7


line true false branch
272 20 0 if (@_)
273 2 18 unless &defopts($self, @_)
311 4 38 if (@_ == 1)
312 4 0 if (my $reftype = ref $_[0]) { }
313 4 0 if ($reftype eq 'HASH') { }
0 0 elsif ($reftype eq 'ARRAY') { }
314 4 0 if $^W
329 0 42 if (@_ % 2)
337 0 92 if ($_[$i] eq 'moddebug')
339 0 0 if $OPT{'moddebug'}
348 28 64 if $key eq 'src'
349 0 92 if $key eq 'dst' or $key eq 'destination'
350 0 92 if $key eq 'moddebug'
353 0 92 if $OPT{'moddebug'} or $self->{'_perlopts'}{'moddebug'}
354 2 62 if (exists $self->{'flag'}{$key} or exists $self->{'string'}{$key} or exists $self->{'counter'}{$key} or exists $self->{'_perlopts'}{$key})
359 2 28 if ($key eq 'files-from' and ref $val eq 'ARRAY') { }
370 30 32 if (exists $self->{'list'}{$key} or $key eq 'source')
371 2 28 if (my $reftype = ref $val) { }
28 0 elsif ($key eq 'source') { }
372 2 0 if ($reftype eq 'ARRAY') { }
0 0 elsif ($key eq 'source' and &blessed($val)) { }
396 28 4 if ($key eq 'dest')
401 2 2 if (exists $self->{'code'}{$key})
402 2 0 if (ref $val eq 'CODE') { }
0 0 elsif ($key eq 'infun' and ref $val eq 'ARRAY') { }
420 36 4 unless $href
429 2 18 unless ref $opts eq 'HASH'
432 34 186 if (exists $self->{$type}{$opt})
437 26 0 if ($opt eq 'source' or $opt eq 'dest' or $opt eq '_args') { }
479 22 6 if (@_)
484 0 22 unless ref $execopts eq 'HASH'
499 0 396 if (exists $runopts{$type}{$opt})
504 22 44 if ($opt eq '_args') { }
44 0 elsif ($opt eq 'source' or $opt eq 'dest') { }
507 20 2 if @{$runopts{$opt};}
518 0 28 if (not @{$merged->{'_args'};} and (@{$merged->{'list'}{'exclude'};} != 0) + (@{$merged->{'list'}{'include'};} != 0) + (@{$merged->{'list'}{'filter'};} != 0) > 1)
531 0 28 if $srchost and substr($srchost, 0, 8) ne 'rsync://'
536 26 2 if (@{$merged->{'_args'};}) { }
541 0 102 if ($key eq 'literal') { }
30 72 elsif (exists $merged->{'flag'}{$key}) { }
8 64 elsif (exists $merged->{'string'}{$key}) { }
2 62 elsif (exists $merged->{'counter'}{$key}) { }
2 60 elsif (exists $merged->{'list'}{$key}) { }
26 34 elsif ($key eq 'source') { }
26 8 elsif ($key eq 'dest') { }
542 0 0 ref $val eq 'ARRAY' ? :
544 30 0 if $val
546 8 0 if $val
552 2 0 ref $val eq 'ARRAY' ? :
556 0 26 if ($merged->{'srchost'}) { }
558 0 0 ref $val eq 'ARRAY' ? :
0 0 ref $val eq 'ARRAY' ? :
0 0 $merged->{'quote-src'} ? :
564 0 0 ref $val eq 'ARRAY' ? :
26 0 ref $val eq 'ARRAY' ? :
0 26 $merged->{'quote-src'} ? :
571 0 26 if ($list) { }
0 26 elsif (not $gotsrc) { }
572 0 0 unless ($gotsrc)
573 0 0 if ($merged->{'srchost'}) { }
585 0 26 $merged->{'quote-dst'} ? :
593 0 2 if @{$merged->{'list'}{'literal'};}
596 2 210 if $merged->{'flag'}{$opt}
600 0 78 if $merged->{'string'}{$opt}
608 2 22 if $opt eq 'literal'
614 2 0 if ($merged->{'source'}) { }
0 0 elsif ($merged->{'srchost'} and $list) { }
615 0 2 if ($merged->{'srchost'}) { }
619 0 0 $merged->{'quote-src'} ? :
624 0 2 $merged->{'quote-src'} ? :
629 0 0 if ($list) { }
0 0 elsif ($merged->{'dest'}) { }
640 2 0 unless ($list)
641 2 0 if ($merged->{'dest'}) { }
644 0 2 $merged->{'quote-dst'} ? :
658 12 16 wantarray ? :
687 0 12 unless $cmd
688 0 12 if $debug
690 2 10 if (ref $infun eq 'CODE') { }
692 1 1 if ($pid) { }
707 0 11 $? & 127 ? :
708 0 11 $stdout ? :
709 4 7 $stderr ? :
710 0 0 if ($outfun and $self->{'_out'})
713 0 0 if ($errfun and $self->{'_err'})
716 4 7 $self->{'_status'} ? :
748 0 0 if ($self->{'_out'}) { }
749 0 0 wantarray ? :
800 8 4 if ($self->{'_err'}) { }
801 0 8 wantarray ? :
823 0 0 if ($self->{'_out'}) { }
824 0 0 wantarray ? :
846 0 0 if ($self->{'_lastcmd'}) { }
848 0 0 wantarray ? :