Branch Coverage

blib/lib/File/DirSync.pm
Criterion Covered Total %
branch 9 340 2.6


line true false branch
48 0 1 if $$self{'verbose'}
63 0 0 if $$self{'_gentle_percent'} < 0
64 0 0 if $$self{'_gentle_percent'} > 99
67 0 0 if $$self{'_gentle_maxops'} < 10
68 0 0 if $$self{'_gentle_maxops'} > 20000000
78 0 0 if (($$self{'_gentle_ops'} += shift() || 1) >= $$self{'_gentle_maxops'})
82 0 0 if ($$self{'_gentle_maxops'} < 20000000 and $elapsed < 2 || $delay < 2) { }
0 0 elsif ($delay > 600) { }
86 0 0 if $$self{'_gentle_maxops'} > 20000000
92 0 0 if $$self{'proctitle'}
105 0 0 unless defined $dir
110 0 0 unless -d $dir
113 0 0 if (@{$$self{'only'};}) { }
115 0 0 if ($only =~ /^$dir/) { }
128 0 0 if $$self{'proctitle'}
129 0 0 if $$self{'verbose'}
138 0 0 if $dir =~ /^(.*)$/
139 0 0 if $$self{'_gentle_percent'}
140 0 0 unless opendir $handle, $dir
141 0 0 if $$self{'proctitle'}
142 0 0 if $$self{'_gentle_percent'}
147 0 0 if (defined $skew)
149 0 0 if ($current > $skew)
153 0 0 if $$self{'_gentle_percent'}
155 0 0 if $node =~ /^\.\.?$/
156 0 0 if $$self{'ignore'}{$node}
160 0 0 if $$self{'_gentle_percent'}
161 0 0 if not $$self{'localmode'} || -l $path and -d _
163 0 0 if -l _
164 0 0 if (defined $skew)
165 0 0 if $$self{'_gentle_percent'}
166 0 0 if ($this_stamp > $skew and not -l $path)
167 0 0 if $$self{'verbose'}
172 0 0 if ($this_stamp > $most_current)
173 0 0 if $$self{'verbose'}
178 0 0 if ($most_current > $current)
179 0 0 if $$self{'verbose'}
180 0 0 if $most_current =~ /^(\d+)$/
181 0 0 if $$self{'_gentle_percent'}
189 0 0 if (@_)
190 0 0 if (shift()) { }
201 0 0 $$self{'_tracking'} ? :
208 0 0 unless defined $src and defined $dst
213 0 0 unless -d $src
219 0 0 if ($upper_dst and not -d $upper_dst)
223 0 0 if $$self{'proctitle'}
232 0 0 if $$self{'_gentle_percent'}
243 0 0 if (-l _)
245 0 0 if $$self{'_gentle_percent'}
247 0 0 if (-l $dst)
249 0 0 if ($point eq readlink $dst)
251 0 0 if $$self{'_gentle_percent'}
255 0 0 if $$self{'verbose'}
256 0 0 unless unlink $dst
257 0 0 if $$self{'_gentle_percent'}
259 0 0 if (-d $dst) { }
0 0 elsif (-e $dst) { }
261 0 0 if $$self{'verbose'}
262 0 0 unless $self->rmtree($dst)
265 0 0 if $$self{'verbose'}
266 0 0 unless unlink $dst
268 0 0 if (-l $dst or -e $dst)
271 0 0 if $point =~ /^(.+)$/
273 0 0 if $$self{'verbose'}
274 0 0 unless symlink $point, $dst
275 0 0 if $$self{'_gentle_percent'}
280 0 0 if ($$self{'nocache'} and -d _)
285 0 0 if (defined($when_src && $when_dst && $size_src && $size_dst) and $when_src == $when_dst and $size_src == $size_dst)
287 0 0 if $$self{'_tracking'}
292 0 0 if (-f _)
294 0 0 if (-l $dst) { }
0 0 elsif (-d _) { }
296 0 0 if $$self{'verbose'}
297 0 0 unless unlink $dst
298 0 0 if $$self{'_gentle_percent'}
301 0 0 if $$self{'verbose'}
302 0 0 unless $self->rmtree($dst)
304 0 0 if $$self{'_gentle_percent'}
305 0 0 if $$self{'proctitle'}
306 0 0 if ($self->copy($src, $dst)) { }
307 0 0 if $$self{'verbose'}
308 0 0 if $$self{'_tracking'}
312 0 0 unless (-e $dst)
314 0 0 if $$self{'_tracking'}
315 0 0 if $$self{'_gentle_percent'}
319 0 0 unless chmod $stat_src[2] & 511, $dst
321 0 0 unless chown $stat_src[4], $stat_src[5], $dst
323 0 0 unless utime $when_src, $when_src, $dst
324 0 0 if $$self{'_gentle_percent'}
329 0 0 unless (-e _)
332 0 0 if $$self{'verbose'}
333 0 0 if $$self{'proctitle'}
334 0 0 if ($self->rmtree($dst)) { }
335 0 0 if $$self{'_tracking'}
337 0 0 if $$self{'_tracking'}
344 0 0 if (-d _)
346 0 0 if (-l $dst)
348 0 0 if $$self{'verbose'}
349 0 0 unless unlink $dst
350 0 0 if $$self{'_gentle_percent'}
352 0 0 if (-f $dst)
355 0 0 if $$self{'verbose'}
356 0 0 if (unlink $dst) { }
357 0 0 if $$self{'_tracking'}
359 0 0 if $$self{'_tracking'}
362 0 0 if $$self{'_gentle_percent'}
364 0 0 unless (-d $dst)
365 0 0 if (mkdir $dst, 493) { }
366 0 0 if $$self{'_tracking'}
368 0 0 if $$self{'_tracking'}
371 0 0 if $$self{'_gentle_percent'}
373 0 0 unless -d $dst
374 0 0 if $$self{'_gentle_percent'}
378 0 0 unless ($$self{'nocache'})
384 0 0 if (defined($when_src && $when_dst) and $when_src == $when_dst)
386 0 0 if $$self{'_tracking'}
391 0 0 if $$self{'verbose'}
402 0 0 if $$self{'proctitle'}
403 0 0 unless opendir $handle, $src
405 0 0 if $node =~ /^\.\.?$/
406 0 0 if $$self{'ignore'}{$node}
407 0 0 if $$self{'localmode'} and not -l "$src/$node" and -d _
411 0 0 if $$self{'_gentle_percent'}
416 0 0 if $$self{'proctitle'}
417 0 0 unless opendir $handle, $dst
419 0 0 if $node =~ /^\.\.?$/
420 0 0 if $$self{'ignore'}{$node}
421 0 0 if $$self{'localmode'} and not -l "$src/$node" and -d _
425 0 0 if $$self{'_gentle_percent'}
429 0 0 if $$self{'proctitle'}
437 0 0 unless chmod $stat_src[2] & 511, $dst
439 0 0 unless chown $stat_src[4], $stat_src[5], $dst
441 0 0 unless utime $when_src, $when_src, $dst
442 0 0 if $$self{'_gentle_percent'}
446 0 0 if $$self{'verbose'}
480 0 0 unless my $lockfile = shift()
481 0 0 unless open LOCK, ">$lockfile"
482 0 0 if (not flock(LOCK, 6))
483 0 0 if $$self{'verbose'}
490 0 0 if (@_)
498 0 0 if (@_)
506 0 0 if (@_)
515 0 0 unless ref $$self{'_tracking'} eq 'HASH'
521 0 0 unless ref $$self{'_tracking'} eq 'HASH'
527 0 0 unless ref $$self{'_tracking'} eq 'HASH'
533 0 0 unless ref $$self{'_tracking'} eq 'HASH'
541 0 4 if $$self{'_gentle_percent'}
543 2 2 if (-d _) { }
545 2 0 if (opendir my $d, $node) { }
549 0 0 unless ($mode & 128)
551 0 0 unless chmod 0777, $node
552 0 0 if $$self{'_gentle_percent'}
554 0 0 if (opendir my $d, $node) { }
564 0 2 if $$self{'_gentle_percent'}
566 0 2 if (not unlink($node) and lstat $node) { }
571 0 0 unless ($dmode & 128)
573 0 0 unless chmod 0777, $dir
574 0 0 if $$self{'_gentle_percent'}
577 0 0 unless unlink $node
578 0 0 if $$self{'_gentle_percent'}
580 0 0 unless exists $$restore{$dir}
582 0 2 if $$self{'_gentle_percent'}
589 0 4 if $$self{'_gentle_percent'}
602 0 0 if (sysopen FROM, $src, 0) { }
603 0 0 if (sysopen TO, $temp_dst, 193, 384) { }
606 0 0 if $$self{'_gentle_percent'}
607 0 0 unless (syswrite TO, $buffer, length $buffer)
622 0 0 unless ($errno or rename $temp_dst, $dst)
625 0 0 if $$self{'_gentle_percent'}
626 0 0 if ($errno)