Branch Coverage

blib/lib/File/Rsync/Mirror/Recent.pm
Criterion Covered Total %
branch 113 216 52.3


line true false branch
77 0 35 unless open my $fh, $file
90 5580 8680 if ($in_pathdb) { }
35 8645 elsif (/(\s+)-\s*__pathdb\s*:/) { }
91 35 5545 if (/$template_for_eop/)
99 8680 5580 unless $in_pathdb
101 0 35 unless close $tfile
109 0 40 unless defined $file
110 0 40 unless (-e $file)
121 0 0 if ($waiting >= 3)
128 0 40 unless rmdir "$file.lock"
264 0 600 unless ($local)
265 0 0 if (my $remote = $self->remote) { }
267 0 0 if ($localroot = $self->localroot) { }
282 0 3000 if ($opt{'max'})
284 0 0 if $locopt{'max'} <= 0
288 3000 0 if (@$res)
291 0 3000 if ($opt{'max'} and scalar @$ret > $opt{'max'})
294 0 3000 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 3000 unless (@$res)
306 0 3000 if $opt{'before'} and &_bigfloatlt($opt{'before'}, $before)
307 0 3000 if (my $sub = $opt{'callback'})
357 72 0 if (@$re) { }
379 72 0 $rf->dirtymark ? :
12 60 $rf->interval eq 'Z' ? :
12 60 $rf->interval eq 'Z' ? :
410 12 0 unless ($options{'verbose'})
436 0 703 if ($set)
440 694 9 unless (defined $pathdb)
455 0 10 unless my $rrfile = $self->remote
460 0 10 if (not defined $rfilename) { }
4 6 elsif (not length $rfilename or $rfilename eq 'RECENT.recent') { }
478 6 4 unless ($abslfile)
496 35 659 if defined $rf0
498 649 10 if ($local) { }
501 10 0 if (my $remote = $self->remote) { }
503 10 0 if ($localroot = $self->localroot) { }
528 117 659 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 15 if (my $logfile = $self->_logfilefordone)
649 15 0 if (my $dirtymark = $self->principal_recentfile->dirtymark)
651 10 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 10 5 unless ($self->_have_written_statusfile)
681 0 20 if (not defined $pid) { }
15 5 elsif ($pid) { }
693 1 23 if (time > $ttleave)
697 9 15 if ($rf->seeded) { }
6 9 elsif ($rf->uptodate) { }
700 5 1 if ($i < $#$rfs)
707 16 11 if ($rf->uptodate) { }
714 1 1 if ($self->_max_one_state)
720 4 1 if ($rfs->[-1]->uptodate)
723 5 0 unless ($options->{'loop'})
727 5 0 if $exit
732 10 5 if (not $options->{'loop'} and $otherproc and $otherproc->recentfiles->[-1]->uptodate)
736 0 5 if ($sleep > 0.01) { }
749 0 20 if ($self->_max_one_state)
754 5 15 if ($i == 0)
757 5 0 if (my $dirtymark = $rf->dirtymark)
759 1 4 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 35 if (defined $set)
808 6 29 unless (defined $x)
833 0 0 if time - $start >= 3
836 0 0 unless rmdir "$file.lock"
846 30 155 if $k =~ /^-(_principal_recentfile|_recentfiles)$/
854 112 1615 if $k =~ /^-(_current_tempfile_fh|_pathdb|_rsync)$/
862 0 0 if time - $start >= 3
873 0 15 unless rename "$file.new", $file
874 0 15 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 20 if (defined $set)
994 10 10 unless (defined $x)
1014 0 16 if (defined $set)
1019 10 6 unless (defined $x)