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) { }
281 0 0 if defined $buf
282 0 0 unless defined $buf
286 0 36 if defined $buf
287 36 0 unless defined $buf
289 0 36 unless ($rc)
290 0 0 if ($File::Copy::Recursive::SkipFlop) { }
301 135 0 if (&$ok_todo_asper_condcopy($org))
302 0 135 if ($File::Copy::Recursive::SkipFlop) { }
303 0 0 if defined $buf
304 0 0 unless defined $buf
307 0 135 if defined $buf
308 135 0 unless defined $buf
310 120 15 if $File::Copy::Recursive::KeepMode
316 40 5 if $File::Copy::Recursive::KeepMode
321 0 9 unless &$recurs($_zero, $_one, $_[2])
322 3 6 wantarray ? :
328 0 0 if (-l $_[0] and $File::Copy::Recursive::CopyLink)
332 2 7 if -d $_[0] or substr($_[0], -1, 1) eq '*'
346 0 12 if substr($File::Copy::Recursive::DirPerms, 0, 1) eq '0'
348 12 0 if (defined $dir)
355 9 0 unless -d $newpth or $nofatal
356 0 58 if not -d $newpth and $nofatal
360 12 0 if (defined $file)
363 10 0 unless -d $newpth or $nofatal
364 0 12 if not -d $newpth and $nofatal
374 3 185 if not -d _ && $orig_dev or $^O ne 'MSWin32' and not $orig_ino
378 0 185 unless chdir $pth
384 0 185 if ($] < 5.006) { }
385 0 0 unless opendir PTH_DH, $pth
390 0 185 unless opendir $pth_dh, $pth
400 72 317 if (-l $flpth) { }
127 190 elsif (-d $flpth) { }
402 0 72 unless unlink $flpth
406 0 127 unless pathrmdir($flpth)
410 0 180 unless unlink $flpth
414 0 175 unless chdir $starting_point
424 0 6 unless -d _ and $orig_dev and $orig_ino
428 0 6 if ($force and 'File::Spec'->file_name_is_absolute($path))
437 10 6 defined $aggregate_path ? :
443 0 6 unless $cur
445 0 6 if ($force)
447 0 0 unless (pathempty($cur))
448 0 0 unless $nofail
452 0 1 if ($nofail) { }
456 1 0 unless rmdir $cur
466 181 0 if (-e $dir) { }
467 0 181 unless -d $dir
474 0 181 if not $orig_dev or $^O ne 'MSWin32' and not $orig_ino
476 0 176 unless pathempty($dir)
478 3 173 unless rmdir $dir
488 4 1112 if (not defined $cur_dev && defined $cur_ino) { }
496 15 1101 if ($orig_dev ne $cur_dev or $orig_ino ne $cur_ino)