Branch Coverage

blib/lib/Mojo/File.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
27 1 3 unless CORE::chmod $mode, $$self
33 0 2 unless copy($$self, $to)
34 1 1 -d $to ? :
41 88 9 (shift())->basename =~ /.+\.([^.]+)$/u ? :
48 2 29 unless -d $$self
49 0 29 unless opendir my $dir, $$self
50 221 29 if $_ ne "."
51 27 2 unless $options->{'hidden'}
53 27 2 unless $options->{'dir'}
62 224 3 unless $options->{'hidden'}
65 0 227 if $options->{'dont_use_nlink'}
69 62 2663 if ($options->{'max_depth'})
71 29 33 if splitdir($rel) >= $options->{'max_depth'}
73 2023 702 if $options->{'dir'} or not -d $File::Find::name
75 219 8 if -d $$self
91 0 7 unless move($$self, $to)
92 1 6 -d $to ? :
97 2 10321 if grep {not defined $_;} @_
98 3589 179 @_ > 1 ? :
6553 3768 @_ == 1 ? :
105 1 129 unless $handle->open($$self, @_)
115 46 6 if -e $$self
133 1 113 unless CORE::open my $file, "<", $$self
136 0 113 unless defined $ret
138 2 111 $encoding ? :
143 1 45 if $encoding
144 1 45 unless CORE::open my $file, ">", $$self
145 1 43 unless ($file->syswrite($content) // -1) == length $content
173 2 2 unless -e $$self
174 0 4 unless utime undef, undef, $$self