Branch Coverage

blib/lib/Mojo/File.pm
Criterion Covered Total %
branch 50 56 89.2


line true false branch
26 1 3 unless CORE::chmod $mode, $$self
32 0 2 unless copy($$self, $to)
33 1 1 -d $to ? :
40 83 9 (shift())->basename =~ /.+\.([^.]+)$/u ? :
47 2 29 unless -d $$self
48 0 29 unless opendir my $dir, $$self
49 221 29 if $_ ne "."
50 27 2 unless $options->{'hidden'}
52 27 2 unless $options->{'dir'}
61 220 3 unless $options->{'hidden'}
64 0 223 if $options->{'dont_use_nlink'}
68 62 2606 if ($options->{'max_depth'})
70 29 33 if splitdir($rel) >= $options->{'max_depth'}
72 1980 688 if $options->{'dir'} or not -d $File::Find::name
74 215 8 if -d $$self
90 0 7 unless move($$self, $to)
91 1 6 -d $to ? :
96 2 10143 if grep {not defined $_;} @_
97 3538 178 @_ > 1 ? :
6427 3716 @_ == 1 ? :
104 1 126 unless $handle->open($$self, @_)
114 46 6 if -e $$self
132 1 107 unless CORE::open my $file, "<", $$self
135 0 107 unless defined $ret
142 1 42 unless CORE::open my $file, ">", $$self
143 1 41 unless ($file->syswrite($content) // -1) == length $content
165 2 2 unless -e $$self
166 0 4 unless utime undef, undef, $$self