Branch Coverage

blib/lib/File/BackupCopy.pm
Criterion Covered Total %
branch 33 56 58.9


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 18 9 unless (defined $num)
128 10 8 if $if_exists
134 2 15 if ($@)
138 0 15 unless copy($file_name, $fh)
144 0 15 unless ($backup_name)
145 0 0 unless unlink $tempname
172 5 0 if (eval { do { symlink '', ''; 1 } }) { }
0 0 elsif ($^O eq 'MSWin32' and eval { do { require Win32API::File } }) { }
196 15 9 if symlink $tempfilename, $backup_name
197 0 9 unless ($!{'EEXIST'})
204 0 15 unless (rename $tempfilename, $backup_name)
220 0 0 if MoveFile($tempfilename, $backup_name)
221 0 0 unless ($!{'EEXIST'})
244 0 0 unless (-f $backup_name)
245 0 0 if rename $tempfilename, $backup_name