Branch Coverage

blib/lib/File/Copy/Recursive.pm
Criterion Covered Total %
branch 109 200 54.5


line true false branch
7 0 6 if $] < 5.006
140 0 147 unless &$samecheck(@_)
141 4 0 if ($File::Copy::Recursive::RMTrgFil and -d $_[1] || -e $_[1])
143 2 2 if (-d $trg)
147 0 4 unless &$samecheck($_[0], $trg)
148 4 0 if (-e $trg)
149 2 2 if ($File::Copy::Recursive::RMTrgFil == 1) { }
150 2 0 unless unlink $trg
153 2 0 unless unlink $trg
158 2 143 if ($path and not -d $path)
161 0 145 if (-l $_[0] and $File::Copy::Recursive::CopyLink) { }
2 143 elsif (-d $_[0] and -f $_[1]) { }
164 0 0 if not -e $target and $File::Copy::Recursive::BdTrgWrn
167 0 0 if -l $new
168 0 0 unless symlink $target, $new
174 0 143 if -d $_[0]
175 2 141 unless copy(@_)
178 1 140 -d $_[1] ? :
180 126 15 if $File::Copy::Recursive::KeepMode
182 3 138 wantarray ? :
186 0 0 if (-l $_[0] and $File::Copy::Recursive::CopyLink)
190 2 7 if -d $_[0] or substr($_[0], -1, 1) eq '*'
199 0 13 if ($File::Copy::Recursive::RMTrgDir and -d $_[1])
200 0 0 if ($File::Copy::Recursive::RMTrgDir == 1) { }
201 0 0 unless pathrmdir($_[1])
204 0 0 unless pathrmdir($_[1])
210 2 11 if (substr($_zero, -1, 1) eq '*')
215 0 13 unless &$samecheck($_zero, $_[1])
216 4 9 if (not -d $_zero or -e $_[1] and not -d $_[1])
221 5 4 if (not -d $_[1]) { }
222 0 5 unless pathmk($_[1], $File::Copy::Recursive::NoFtlPth)
225 1 3 if ($File::Copy::Recursive::CPRFComp and not $globstar)
239 9 36 if $end eq $baseend
240 9 36 if $end eq $baseend
242 0 45 if substr($File::Copy::Recursive::DirPerms, 0, 1) eq '0'
243 37 8 unless -d $end
244 0 0 if ($File::Copy::Recursive::MaxDepth and $File::Copy::Recursive::MaxDepth =~ /^\d+$/ and $level >= $File::Copy::Recursive::MaxDepth)
245 0 0 if $File::Copy::Recursive::KeepMode
246 0 0 if wantarray
253 0 45 if ($] < 5.006) { }
254 0 0 unless opendir STR_DH, $str
259 0 45 unless opendir my $str_dh, $str
268 135 171 if (-l $org and $File::Copy::Recursive::CopyLink) { }
36 135 elsif (-d $org) { }
271 0 90 if not -e $target and $File::Copy::Recursive::BdTrgWrn
273 0 135 if -l $new
274 0 135 unless symlink $target, $new
278 0 36 if (not -w $org and $File::Copy::Recursive::KeepMode) { }
280 0 0 if defined $buf
281 0 0 unless defined $buf
285 0 36 if defined $buf
286 36 0 unless defined $buf
288 0 36 unless ($rc)
289 0 0 if ($File::Copy::Recursive::SkipFlop) { }
300 135 0 if (&$ok_todo_asper_condcopy($org))
301 0 135 if ($File::Copy::Recursive::SkipFlop) { }
302 0 0 if defined $buf
303 0 0 unless defined $buf
306 0 135 if defined $buf
307 135 0 unless defined $buf
309 120 15 if $File::Copy::Recursive::KeepMode
315 40 5 if $File::Copy::Recursive::KeepMode
320 0 9 unless &$recurs($_zero, $_one, $_[2])
321 3 6 wantarray ? :
327 0 0 if (-l $_[0] and $File::Copy::Recursive::CopyLink)
331 2 7 if -d $_[0] or substr($_[0], -1, 1) eq '*'
345 0 12 if substr($File::Copy::Recursive::DirPerms, 0, 1) eq '0'
347 12 0 if (defined $dir)
354 9 0 unless -d $newpth or $nofatal
355 0 58 if not -d $newpth and $nofatal
359 12 0 if (defined $file)
362 10 0 unless -d $newpth or $nofatal
363 0 12 if not -d $newpth and $nofatal
373 3 185 if not -d _ && defined $orig_dev or $^O ne 'MSWin32' and not $orig_ino
377 0 185 unless chdir $pth
383 0 185 if ($] < 5.006) { }
384 0 0 unless opendir PTH_DH, $pth
389 0 185 unless opendir $pth_dh, $pth
399 72 317 if (-l $flpth) { }
127 190 elsif (-d $flpth) { }
401 0 72 unless unlink $flpth
405 0 127 unless pathrmdir($flpth)
409 0 180 unless unlink $flpth
413 0 175 unless chdir $starting_point
423 0 6 unless -d _ and defined $orig_dev and $orig_ino
427 0 6 if ($force and 'File::Spec'->file_name_is_absolute($path))
436 10 6 defined $aggregate_path ? :
442 0 6 unless $cur
444 0 6 if ($force)
446 0 0 unless (pathempty($cur))
447 0 0 unless $nofail
451 0 1 if ($nofail) { }
455 1 0 unless rmdir $cur
465 181 0 if (-e $dir) { }
466 0 181 unless -d $dir
473 0 181 if not defined $orig_dev or $^O ne 'MSWin32' and not $orig_ino
475 0 176 unless pathempty($dir)
477 3 173 unless rmdir $dir
487 4 1112 if (not defined $cur_dev && defined $cur_ino) { }
495 15 1101 if ($orig_dev ne $cur_dev or $orig_ino ne $cur_ino)