Branch Coverage

blib/lib/Doit/File.pm
Criterion Covered Total %
branch 58 76 76.3


line true false branch
29 1 27 unless (defined $file)
32 1 26 if (not defined $code) { }
1 25 elsif (ref $code ne 'CODE') { }
45 22 3 unless (defined $tmp_dir)
46 21 1 if (defined $dest_dir and -d $dest_dir) { }
49 1 0 if (eval { do { require File::Spec; 1 } }) { }
58 1 24 if %opts
64 1 22 if fileno $cleanup_fh
67 5 18 if -e $cleanup_file
70 1 23 if ($tmp_dir eq '/dev/full') { }
73 0 1 unless open $tmp_fh, ">", $tmp_file
80 2 21 if (defined $mode) { }
85 3 20 if ($tmp_dir ne $dest_dir)
87 2 1 if (@stat_destdir)
88 1 1 if ($^O =~ /bsd/ or $^O eq "darwin" or $stat_destdir[2] & 1024)
101 22 2 if ($same_fs) { }
102 14 8 if (-e $file)
110 1 23 if ($@)
114 0 23 if ($] < "5.010001")
116 1 22 unless $tmp_fh->close
117 0 22 if ($] < "5.010001" and $! != 0)
121 3 19 if ($check_change)
123 1 2 if (File::Compare::compare($tmp_file, $file) == 0)
129 20 1 if ($same_fs) { }
134 0 1 if (-e $file)
135 0 0 unless @dest_stat = stat $file
140 0 1 if (@dest_stat) { }
0 1 elsif (defined $mode) { }
141 0 0 if defined $mode
144 0 0 if defined $mode
154 20 0 if $for eq "rename" and Deparse error: Can't locate object method "object_2svref" via package "B::SPECIAL" at /usr/local/lib/perl5/5.42.0/B/Deparse.pm line 5762.
156 0 0 unless @s
158 0 0 if $old_mode & 128
165 1 26 if $got_digest_ref and ref $got_digest_ref ne "SCALAR"
167 1 25 if %options
169 2 23 unless -r $file
173 1 22 unless ($got_digest)
176 5 17 if $got_digest_ref