Branch Coverage

blib/lib/File/Rsync.pm
Criterion Covered Total %
branch 97 184 52.7


line true false branch
272 11 0 if (@_)
273 1 10 unless &defopts($self, @_)
311 2 20 if (@_ == 1)
312 2 0 if (my $reftype = ref $_[0]) { }
313 2 0 if ($reftype eq 'HASH') { }
0 0 elsif ($reftype eq 'ARRAY') { }
314 2 0 if $^W
329 0 22 if (@_ % 2)
337 0 53 if ($_[$i] eq 'moddebug')
339 0 0 if $OPT{'moddebug'}
348 15 38 if $key eq 'src'
349 0 53 if $key eq 'dst' or $key eq 'destination'
350 0 53 if $key eq 'moddebug'
353 0 53 if $OPT{'moddebug'} or $self->{'_perlopts'}{'moddebug'}
354 2 34 if (exists $self->{'flag'}{$key} or exists $self->{'string'}{$key} or exists $self->{'counter'}{$key} or exists $self->{'_perlopts'}{$key})
359 1 18 if ($key eq 'files-from' and ref $val eq 'ARRAY') { }
370 17 17 if (exists $self->{'list'}{$key} or $key eq 'source')
371 2 15 if (my $reftype = ref $val) { }
15 0 elsif ($key eq 'source') { }
372 2 0 if ($reftype eq 'ARRAY') { }
0 0 elsif ($key eq 'source' and &blessed($val)) { }
396 15 2 if ($key eq 'dest')
401 1 1 if (exists $self->{'code'}{$key})
402 1 0 if (ref $val eq 'CODE') { }
0 0 elsif ($key eq 'infun' and ref $val eq 'ARRAY') { }
420 19 2 unless $href
429 1 10 unless ref $opts eq 'HASH'
432 22 116 if (exists $self->{$type}{$opt})
437 16 0 if ($opt eq 'source' or $opt eq 'dest' or $opt eq '_args') { }
479 11 4 if (@_)
484 0 11 unless ref $execopts eq 'HASH'
499 0 198 if (exists $runopts{$type}{$opt})
504 11 22 if ($opt eq '_args') { }
22 0 elsif ($opt eq 'source' or $opt eq 'dest') { }
507 10 1 if @{$runopts{$opt};}
518 0 15 if (not @{$merged->{'_args'};} and (@{$merged->{'list'}{'exclude'};} != 0) + (@{$merged->{'list'}{'include'};} != 0) + (@{$merged->{'list'}{'filter'};} != 0) > 1)
531 0 15 if $srchost and substr($srchost, 0, 8) ne 'rsync://'
536 14 1 if (@{$merged->{'_args'};}) { }
541 0 58 if ($key eq 'literal') { }
18 40 elsif (exists $merged->{'flag'}{$key}) { }
4 36 elsif (exists $merged->{'string'}{$key}) { }
2 34 elsif (exists $merged->{'counter'}{$key}) { }
2 32 elsif (exists $merged->{'list'}{$key}) { }
14 18 elsif ($key eq 'source') { }
14 4 elsif ($key eq 'dest') { }
542 0 0 ref $val eq 'ARRAY' ? :
544 18 0 if $val
546 4 0 if $val
552 2 0 ref $val eq 'ARRAY' ? :
556 0 14 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' ? :
14 0 ref $val eq 'ARRAY' ? :
0 14 $merged->{'quote-src'} ? :
571 0 14 if ($list) { }
0 14 elsif (not $gotsrc) { }
572 0 0 unless ($gotsrc)
573 0 0 if ($merged->{'srchost'}) { }
585 0 14 $merged->{'quote-dst'} ? :
593 0 1 if @{$merged->{'list'}{'literal'};}
596 1 105 if $merged->{'flag'}{$opt}
600 0 39 if $merged->{'string'}{$opt}
608 1 11 if $opt eq 'literal'
614 1 0 if ($merged->{'source'}) { }
0 0 elsif ($merged->{'srchost'} and $list) { }
615 0 1 if ($merged->{'srchost'}) { }
619 0 0 $merged->{'quote-src'} ? :
624 0 1 $merged->{'quote-src'} ? :
629 0 0 if ($list) { }
0 0 elsif ($merged->{'dest'}) { }
640 1 0 unless ($list)
641 1 0 if ($merged->{'dest'}) { }
644 0 1 $merged->{'quote-dst'} ? :
658 6 9 wantarray ? :
687 0 6 unless $cmd
688 0 6 if $debug
692 0 6 $? & 127 ? :
693 0 6 $stdout ? :
694 2 4 $stderr ? :
695 0 0 if ($outfun and $self->{'_out'})
698 0 0 if ($errfun and $self->{'_err'})
701 2 4 $self->{'_status'} ? :
733 0 0 if ($self->{'_out'}) { }
734 0 0 wantarray ? :
785 4 2 if ($self->{'_err'}) { }
786 0 4 wantarray ? :
808 0 0 if ($self->{'_out'}) { }
809 0 0 wantarray ? :
831 0 0 if ($self->{'_lastcmd'}) { }
833 0 0 wantarray ? :