Branch Coverage

blib/lib/YATT/Lite/VFS.pm
Criterion Covered Total %
branch 102 144 70.8


line true false branch
69 84 0 if ($spec)
73 22 62 if $spec->[0] eq 'data' or not $root->{'cf_path'}
82 0 84 unless $self->{'cf_facade'}
85 0 84 if $self->{'cf_import'}
101 1 4 -d $path ? :
102 4 1 if ($kind eq 'file') { }
1 0 elsif ($kind eq 'dir') { }
116 0 0 if -f $_
132 0 0 if $root->lookup_1($vfs, $file->{'cf_name'})
146 0 381 unless my($name) = $filename =~ /^(\w+)/
157 0 5 unless my $dirname = $folder->dirname
160 0 5 if ($fn =~ /^@/) { }
2 3 elsif ($fn =~ s[^((?:\.\./)+)][]) { }
182 23 136 if ($item and $item->isa($vfs->Folder)) { }
191 0 0 unless my YATT::Lite::VFS::Folder $folder = $vfs->{'cf_entns2vfs_item'}{$entns}
199 0 197 @_ ? :
219 0 0 if (my $parent = $file->{'cf_parent'}) { }
0 0 elsif (my $path = $file->{'cf_path'}) { }
236 225 15 unless (@_)
239 4 221 unless $vfs->{'cf_mark'}{&refaddr($file)}++
241 159 66 if $item
247 450 61 if (my YATT::Lite::VFS::Item $item = $dir->cached_in($dir->{'Item'} //= {}, $name, $vfs, $vfs->{'cf_mark'}))
249 143 5 unless (ref $item and UNIVERSAL::isa($item, 'YATT::Lite::VFS::Item') or $vfs->{'cf_no_auto_create'})
256 408 40 unless @_
257 16 24 if (not $vfs->{'cf_no_mro_c3'} and $dir->{'cf_entns'}) { }
262 39 1 if $item
268 50 21 if (not $vfs->{'cf_no_mro_c3'} and $item->{'cf_entns'}) { }
270 121 229 $o ? :
272 72 33 unless my $ans = $super->lookup_1($vfs, $name, @_)
278 3 17 unless my $ans = $super->lookup($vfs, $name, @_)
293 9 19 if ($super->{'cf_parent'} and $file->{'cf_parent'} == $super->{'cf_parent'}) { }
302 660 11 if ($file->{'cf_entns'} and &mro::get_mro($file->{'cf_entns'}) eq 'c3') { }
324 0 1 unless defined $vfs
325 0 1 unless defined $in->{'cf_path'}
328 2 0 if (defined $_ and not $dup{$_}++) { }
336 0 2 $dup2{$name}++ ? :
342 7 113 unless defined $in->{'cf_path'}
346 80 33 if (my $fn = $vfs->find_ext($vfsname, $vfs->{'cf_ext_public'})) { }
8 25 elsif ($fn = $vfs->find_ext($vfsname, $vfs->{'cf_ext_private'})) { }
1 24 elsif (-d $vfsname) { }
350 0 8 -d $fn ? :
362 0 146 ref $spec ? :
0 146 !defined($spec) ? :
364 88 58 if -e $fn
380 0 3 unless $file->{'cf_path'} or $file->{'cf_string'}
384 19 3 if ($file->{'cf_path'}) { }
386 0 19 unless open my $fh, '<', $file->{'cf_path'}
395 4 15 if (defined $kind and my $sub = $file->can("declare_$kind")) { }
410 21 34 unless defined(my $deps = $file->{'dependency'})
411 0 34 if ($detail) { }
412 0 0 wantarray ? :
421 34 0 unless ($self->{'cf_mark'}{&refaddr($dep)}++)
431 0 19 ref $path ? :
455 261 83 if (my $sub = $vfs->can("create_$kind")) { }
480 342 2 if (ref $vfs)
485 67 277 if (my $path = $folder->{'cf_path'} and not defined $folder->{'cf_name'})
491 250 94 if (my YATT::Lite::VFS::Folder $parent = $folder->{'cf_parent'})
492 230 20 if (defined $parent->{'cf_entns'})
500 299 45 if ($folder->{'cf_entns'})
501 299 0 unless ($vfs->{'cf_no_mro_c3'})
504 0 299 if (defined(my YATT::Lite::VFS::Folder $old = $vfs->{'cf_entns2vfs_item'}{$folder->{'cf_entns'}}))
505 0 0 if ($old != $folder)
523 28 161 if (ref $primary) { }
539 38 0 if (ref $desc eq 'ARRAY')
543 34 4 if ($desc->[0] eq 'dir') { }
551 0 38 if $desc->{'cf_parent'}
568 0 252 if $file->{'cf_overlay'}
569 161 91 unless $file->{'cf_path'}
573 0 91 if (@found > 1) { }
90 1 elsif (not @found) { }
581 1 0 if ($public) { }
607 84 0 wantarray ? :