Branch Coverage

web/cgi-bin/yatt.lib/YATT/Registry.pm
Criterion Covered Total %
branch 165 242 68.1


line true false branch
69 0 20 if (defined $ENV{'YATT_CF_LINEINFO'})
116 0 17 if (&is_tainted($script))
130 0 17 if (wantarray) { }
136 0 17 if $@
137 0 17 wantarray ? :
145 4 13 unless @_
147 0 13 if @_ % 2
151 12 1 if (my $sub = $modpack->can("import_$name")) { }
0 1 elsif ($sub = $CURRENT->can("configure_$name")) { }
1 0 elsif ($$fields{"cf_$name"}) { }
165 0 12 unless defined $ROOT
167 0 12 unless my YATT::Registry::NS::Dir $dir = $CURRENT->lookup_dir($ROOT, split(m[/], $vpath, 0))
177 0 0 unless (-d $realdir)
211 0 3 if ('YATT::Registry'->is_reloading and defined *{$glob;}{'CODE'})
229 0 26 unless my $sub = $modpack->can($name)
248 2 265 defined $_ ? :
256 0 2277 unless (defined $nsid)
259 473 1804 if $nsid == 0
266 156 1379 unless ref $nsobj
270 20 267 if ($root == $nsobj) { }
271 2 18 unless $root->{'cf_app_prefix'}
287 0 551 unless $node->{'cf_loadkey'}
288 322 229 if $node->{'cf_age'} and not $root->{'cf_auto_reload'}
289 0 229 unless $root->{'Loader'}
292 7 222 if $node->{'cf_age'} and not $node->{'is_loaded'}
296 0 222 if $root->{'cf_debug_registry'}
345 94 7 @_ ? :
98 2 if $widget = $tmpl->lookup_widget($root, @_ ? @_ : $nsname)
349 0 2 if ($root->has_ns($root, $nsname))
350 0 0 if $widget = $root->get_widget_from_dir($root, $nsname, @_)
362 0 164 unless ($dir)
365 19 145 if (@elempath == 2) { }
145 0 elsif (@elempath == 1) { }
380 0 0 unless $w->declared
389 0 101 unless defined $root and ref $root and $root->isa('YATT::Registry')
391 0 101 unless @_
397 103 0 if (@elempath <= 2) { }
405 1 102 if (@elempath == 2) { }
411 98 4 if $found
429 0 2 if $nsid = $dir->{'Dir'}{$nsname} || $dir->{'Template'}{$nsname}
432 2 0 unless $dir->{'cf_base_nsid'}
445 0 4 unless $nsid
452 0 12 unless UNIVERSAL::isa($root, 'YATT::Registry')
453 0 12 unless @nspath
457 7 12 if $ns eq ''
459 0 12 unless ($nsid)
461 0 0 $start->{'cf_base_nsid'} ? :
476 8 1 unless $dict->{$key}++
479 4 0 wantarray ? :
497 0 7 unless ($nsid)
508 12 5 if (defined(my $base = $dir->{'cf_base_nsid'}))
519 0 22 if (defined $dir->{'cf_name'} and $dir->{'cf_name'} eq $ns)
521 0 0 if $widget
526 2 21 unless my $nsid = $dir->{$type}{$ns}
527 0 21 unless my $widget = $root->nsobj($nsid)->widget_by_name($root, $name)
531 0 1 unless $dir->{'cf_base_nsid'}
538 175 17 if (my $nsid = $dir->{'Template'}{$name})
543 17 169 unless $dir->{'Widget'}{$name}
548 0 1 if ($tmpl->{'cf_name'} eq $ns)
550 0 0 if $widget
553 0 1 if (defined $parent->{'cf_name'} and $parent->{'cf_name'} eq $ns)
555 0 0 if $widget
564 87 16 if $widget = $tmpl->{'Widget'}{$name}
570 10 5 if $widget = $root->nsobj($tmpl->{'cf_parent_nsid'})->widget_by_name($root, $name)
573 3 2 if ($tmpl->{'cf_base_template'})
575 3 0 if $widget = $root->nsobj($tmpl->{'cf_base_template'})->widget_by_name($root, $name)
579 0 2 if ($tmpl->{'cf_base_nsid'})
581 0 0 if $widget = $root->nsobj($tmpl->{'cf_base_nsid'})->widget_by_name($root, $name)
591 0 18 ref $fmt ? :
628 8 854 unless @$list
629 0 854 unless defined $pattern
630 809 45 if (ref $pattern) { }
631 26 783 unless $list->[0] =~ /$pattern/
633 10 35 unless $list->[0] eq $pattern
684 6 13 $is_opened ? :
711 183 183 if $shift
714 181 185 if (my $handler = $root->can($handler_name))
726 0 4 if ($builder->{'parent'})
731 0 4 unless my YATT::Registry::NS::Template $base = $this->lookup_template($root, $path)
750 0 87 if ($builder->{'parent'})
755 2 85 if ($builder->{'cf_root_builder'})
762 0 87 if @configs
776 1 89 if ($builder->{'parent'})
782 0 89 unless defined(my $name = $args->node_name)
838 19 290 unless my $sub = $root->can('add_decl_' . $args->node_type_name)
851 0 239 unless (defined $argname)
854 0 239 if ($target->has_arg($argname))
860 3 236 if (ref $type) { }
866 7 232 if (defined $typename and my $sub = $root->can("attr_declare_$typename")) { }
875 150 277 unless defined $type
876 1 426 ref $type ? :
877 0 427 unless defined(my $class = $root->{'cf_type_map'}{$primary})
879 0 1 @subtype >= 2 ? :
1 426 if @subtype
881 172 255 if (my $sub = $root->can("create_var_$primary")) { }
901 222 0 if (my $sub = $loader->can("refresh_$type")) { }
912 23 199 if defined $old and $old >= $mtime
925 1 19 if (-d (my $libdir = "$dir/lib"))
944 0 17 if &is_tainted($fn)
945 0 17 unless open my $fh, '<' . ($layer || ''), $fn
955 21 43 unless $loader->is_modified($dirname, $dir->{'cf_mtime'}{$dirname})
960 0 43 if (&is_tainted($dirname))
964 21 22 if ($root == $dir) { }
965 0 17 ref $_ ? :
4 17 !defined($_) ? :
974 4 1 if ($root->{'cf_default_base_class'} and $root->{'cf_default_base_class'} ne $root->{'cf_pkg'} || $root->{'is_loaded'})
987 17 26 if (-r $rcfile)
989 2 15 if $is_reload
991 9 8 unless $root->{'cf_no_lineinfo'}
1009 0 60 unless opendir DIR, $dirname
1011 151 403 if $name =~ /^\./
1014 108 295 if (-d $path) { }
163 132 elsif ($name =~ /^(\w+)\.html?$/) { }
1015 0 108 unless $name =~ /^(?:\w|-)+$/
1038 2 156 unless ($loader->is_modified($path, $tmpl->{'cf_mtime'}{$path}))
1040 0 2 if $root->{'cf_debug_registry'}
1044 0 156 if (&is_tainted($path))
1048 146 10 if (my $cleaner = $root->can('forget_template'))
1057 0 156 defined $_ ? :
1069 0 156 unless open my $fh, '<', $path
1089 0 0 if ($line =~ /^\#line (\d+)/) { }