Branch Coverage

blib/lib/File/BackupCopy.pm
Criterion Covered Total %
branch 31 56 55.3


line true false branch
55 5 17 if (@_ == 1) { }
17 0 elsif (@_ % 2 == 0) { }
64 12 10 unless (defined $type)
66 9 3 if (exists $envtrans{$v}) { }
77 4 4 if ($error)
89 0 20 if keys %_
91 11 9 if ($dir)
94 6 14 unless copy($file_name, $backup_name)
104 0 27 if (@_ == 1) { }
27 0 elsif (@_ % 2 == 0) { }
111 0 27 if keys %_
116 13 14 $dir ? :
120 13 0 if (/.+\.~(\d+)~$/aa) { }
127 9 18 if (defined $num) { }
130 10 8 if $if_exists
136 2 15 if ($@)
140 0 15 unless copy($file_name, $fh)
146 0 15 unless ($backup_name)
147 0 0 unless unlink $tempname
174 5 0 if (eval { do { symlink '', ''; 1 } }) { }
0 0 elsif ($^O eq 'MSWin32' and eval { do { require Win32API::File } }) { }
198 15 0 if symlink $tempfilename, $backup_name
199 0 0 unless ($!{'EEXIST'})
206 0 15 unless (rename $tempfilename, $backup_name)
222 0 0 if MoveFile($tempfilename, $backup_name)
227 0 0 unless (fileLastError() == 80 or fileLastError() == 183)
247 0 0 unless (-f $backup_name)
248 0 0 if rename $tempfilename, $backup_name