Branch Coverage

blib/lib/File/Rsync/Mirror/Recent.pm
Criterion Covered Total %
branch 107 216 49.5


line true false branch
77 0 24 unless open my $fh, $file
90 48 6012 if ($in_pathdb) { }
24 5988 elsif (/(\s+)-\s*__pathdb\s*:/) { }
91 24 24 if (/$template_for_eop/)
99 6012 48 unless $in_pathdb
101 0 24 unless close $tfile
109 0 28 unless defined $file
110 0 28 unless (-e $file)
121 0 0 if ($waiting >= 3)
128 0 28 unless rmdir "$file.lock"
264 0 500 unless ($local)
265 0 0 if (my $remote = $self->remote) { }
267 0 0 if ($localroot = $self->localroot) { }
282 0 2500 if ($opt{'max'})
284 0 0 if $locopt{'max'} <= 0
288 2500 0 if (@$res)
291 0 2500 if ($opt{'max'} and scalar @$ret > $opt{'max'})
294 0 2500 if ($opt{'after'})
295 0 0 if ($locopt{'info'}{'last'} and &_bigfloatlt($locopt{'info'}{'last'}{'epoch'}, $opt{'after'}))
298 0 0 if (&_bigfloatgt($opt{'after'}, $locopt{'info'}{'first'}{'epoch'}))
302 0 2500 unless (@$res)
306 0 2500 if $opt{'before'} and &_bigfloatlt($opt{'before'}, $before)
307 0 2500 if (my $sub = $opt{'callback'})
357 60 0 if (@$re) { }
379 60 0 $rf->dirtymark ? :
10 50 $rf->interval eq 'Z' ? :
10 50 $rf->interval eq 'Z' ? :
410 10 0 unless ($options{'verbose'})
436 0 582 if ($set)
440 574 8 unless (defined $pathdb)
455 0 9 unless my $rrfile = $self->remote
460 0 9 if (not defined $rfilename) { }
4 5 elsif (not length $rfilename or $rfilename eq 'RECENT.recent') { }
478 5 4 unless ($abslfile)
496 32 550 if defined $rf0
498 541 9 if ($local) { }
501 9 0 if (my $remote = $self->remote) { }
503 9 0 if ($localroot = $self->localroot) { }
528 105 550 if defined $rfs
607 0 0 unless defined $sdm
609 0 0 if $rf->seeded
611 0 0 unless defined $rfdm
612 0 0 unless $rfdm eq $sdm
614 0 0 unless defined $done
616 0 0 unless defined $done_intervals
620 0 0 unless defined $minmax
621 0 0 unless $done->covered(@$minmax{'max', 'min'})
644 0 14 if (my $logfile = $self->_logfilefordone)
649 14 0 if (my $dirtymark = $self->principal_recentfile->dirtymark)
651 9 5 if (not defined $mydm) { }
0 5 elsif ($dirtymark ne $mydm) { }
654 0 0 if ($self->verbose)
656 0 0 if (my $vl = $self->verboselog) { }
657 0 0 unless open $fh, '>>', $vl
667 9 5 unless ($self->_have_written_statusfile)
681 0 14 if (not defined $pid) { }
10 4 elsif ($pid) { }
693 0 20 if (time > $ttleave)
697 8 12 if ($rf->seeded) { }
4 8 elsif ($rf->uptodate) { }
700 3 1 if ($i < $#$rfs)
707 16 14 if ($rf->uptodate) { }
714 0 0 if ($self->_max_one_state)
720 4 0 if ($rfs->[-1]->uptodate)
723 4 0 unless ($options->{'loop'})
727 4 0 if $exit
732 10 0 if (not $options->{'loop'} and $otherproc and $otherproc->recentfiles->[-1]->uptodate)
736 0 0 if ($sleep > 0.01) { }
749 0 22 if ($self->_max_one_state)
754 4 18 if ($i == 0)
757 4 0 if (my $dirtymark = $rf->dirtymark)
759 1 3 if (not defined $mydm or $dirtymark ne $mydm)
772 16 0 unless defined $sleep
774 13 3 if $i < $#$rfs
788 0 16 if (not defined $thismerged->{'epoch'} or &_bigfloatlt($nextminmax->{'max'}, $thismerged->{'epoch'}))
804 0 28 if (defined $set)
808 5 23 unless (defined $x)
833 0 0 if time - $start >= 3
836 0 0 unless rmdir "$file.lock"
846 26 134 if $k =~ /^-(_principal_recentfile|_recentfiles)$/
854 100 1400 if $k =~ /^-(_current_tempfile_fh|_pathdb|_rsync)$/
862 0 0 if time - $start >= 3
873 0 13 unless rename "$file.new", $file
874 0 13 unless rmdir "$file.lock"
879 0 0 if ($self->verbose)
881 0 0 if (my $vl = $self->verboselog) { }
882 0 0 unless open $fh, '>>', $vl
901 0 4 unless length $rfilename
904 4 0 if ($rfilename =~ /\.recent$/)
909 0 4 if ($symlink =~ m[/])
913 0 4 if (-e $localrfile) { }
915 0 0 if ($old_symlink eq $symlink) { }
916 0 0 unless unlink $abslfile
919 0 0 unless rename $abslfile, $localrfile
922 0 4 unless rename $abslfile, $localrfile
938 0 8 unless defined $suffix
949 8 0 if (my $rso = $self->rsync_options) { }
950 8 0 if (ref $rso eq 'HASH') { }
0 0 elsif (ref $rso eq 'ARRAY') { }
958 0 8 if ($File::Rsync::VERSION <= 0.45) { }
963 0 8 unless ($rsync)
969 0 8 unless $rsync->exec('src', join('/', $self->remoteroot, $rfile), 'dst', $dst)
974 4 4 unless (-l $dst)
976 0 4 unless chmod $mode, $dst
989 0 18 if (defined $set)
994 9 9 unless (defined $x)
1014 0 14 if (defined $set)
1019 9 5 unless (defined $x)