Branch Coverage

lib/File/Copy/Vigilant.pm
Criterion Covered Total %
branch 52 70 74.2


line true false branch
98 6 15 defined $params{'retries'} ? :
99 0 21 unless ($retries =~ /^\d+$/x)
104 8 13 defined $params{'check'} ? :
106 0 21 unless ($check =~ /^md5|size|compare|none$/x)
112 0 21 if (defined $postcopy and ref $postcopy ne 'CODE')
118 5 16 if ($check_error)
130 7 11 if ($copy_error) { }
147 1 20 if ($@)
153 21 0 wantarray ? :
169 2 19 if (ref $source) { }
0 19 elsif (ref \$source eq 'GLOB') { }
171 1 0 if (ref $source eq 'GLOB' or eval { do { $source->isa('GLOB') } } or eval { do { $source->isa('IO::Handle') } })
183 2 17 if (ref $dest) { }
0 17 elsif (ref \$dest eq 'GLOB') { }
185 1 0 if (ref $dest eq 'GLOB' or eval { do { $dest->isa('GLOB') } } or eval { do { $dest->isa('IO::Handle') } })
197 1 16 unless (stat $source)
202 0 16 if (-d $source)
207 0 16 unless (-f $source or -l $source)
223 14 5 if ($check eq 'md5')
227 16 3 if ($check eq 'md5' or $check eq 'size')
232 0 19 unless (File::Copy::copy($source, $dest))
237 9 10 if defined $postcopy
240 15 3 if ($check eq 'md5' or $check eq 'size')
245 13 5 if ($check eq 'md5') { }
2 3 elsif ($check eq 'size') { }
2 1 elsif ($check eq 'compare') { }
247 5 8 if ($source_size != $dest_size)
252 0 8 if ($source_md5 ne $dest_md5)
259 1 1 if ($source_size != $dest_size)
266 1 1 if (File::Compare::compare($source, $dest))
297 0 3 unless ($copy_success)
299 0 0 wantarray ? :
304 3 0 if (unlink $source) { }
316 0 3 if ($@)
322 3 0 wantarray ? :