Branch Coverage

blib/lib/YATT/Lite/VFS.pm
Criterion Covered Total %
branch 76 110 69.0


line true false branch
64 51 0 if ($spec)
68 22 29 if $spec->[0] eq 'data' or not $root->{'cf_path'}
77 0 51 unless $self->{'cf_facade'}
88 0 196 unless my($name) = $filename =~ /^(\w+)/
98 0 0 unless my $dirname = $folder->dirname
111 14 80 if ($item and $item->isa($vfs->Folder)) { }
121 0 34 @_ ? :
136 0 0 if (my $parent = $file->{'cf_parent'}) { }
0 0 elsif (my $path = $file->{'cf_path'}) { }
153 125 9 unless (@_)
156 1 124 unless $vfs->{'cf_mark'}{&refaddr($file)}++
158 104 21 if $item
165 265 27 if (my YATT::Lite::VFS::Item $item = $dir->cached_in($dir->{'Item'} //= {}, $name, $vfs, $vfs->{'cf_mark'}))
167 140 5 unless (ref $item and UNIVERSAL::isa($item, 'YATT::Lite::VFS::Item') or $vfs->{'cf_no_auto_create'})
172 225 38 unless @_
174 37 1 if $item
182 10 43 unless my $ans = $super->lookup($vfs, $name, @_)
197 338 4 if $file->{'cf_parent'}
200 3 339 if $file->{'cf_overlay'}
209 0 1 unless defined $in->{'cf_path'}
212 2 0 if (defined $_ and not $dup{$_}++) { }
220 0 2 $dup2{$name}++ ? :
226 5 50 unless defined $in->{'cf_path'}
230 26 24 if (my $fn = $vfs->find_ext($vfsname, $vfs->{'cf_ext_public'})) { }
6 18 elsif ($fn = $vfs->find_ext($vfsname, $vfs->{'cf_ext_private'})) { }
1 17 elsif (-d $vfsname) { }
234 0 6 -d $fn ? :
246 0 74 ref $spec ? :
0 74 !defined($spec) ? :
248 32 42 if -e $fn
264 0 3 unless $file->{'cf_path'} or $file->{'cf_string'}
268 19 3 if ($file->{'cf_path'}) { }
270 0 19 unless open my $fh, '<', $file->{'cf_path'}
279 4 15 if (defined $kind and my $sub = $file->can("declare_$kind")) { }
294 0 0 unless defined(my $deps = $file->{'dependency'})
295 0 0 if ($detail) { }
296 0 0 wantarray ? :
305 0 0 unless ($self->{'cf_mark'}{&refaddr($dep)}++)
315 0 18 ref $path ? :
339 201 50 if (my $sub = $vfs->can("create_$kind")) { }
356 249 2 if (ref $vfs)
361 34 217 if (my $path = $folder->{'cf_path'} and not defined $folder->{'cf_name'})
367 190 61 if (my YATT::Lite::VFS::Folder $parent = $folder->{'cf_parent'})
368 170 20 if (defined $parent->{'cf_entns'})
382 28 157 if (ref $primary) { }
394 16 0 if (ref $desc eq 'ARRAY')
396 12 4 if ($desc->[0] eq 'dir') { }
403 0 16 if ref $desc eq 'ARRAY'
405 0 16 if $desc->{'cf_parent'}
422 0 192 if $file->{'cf_overlay'}
423 157 35 unless $file->{'cf_path'}
427 0 35 if (@found > 1) { }
34 1 elsif (not @found) { }
435 1 0 if ($public) { }
461 51 0 wantarray ? :