Branch Coverage

blib/lib/Config/Model/Loader.pm
Criterion Covered Total %
branch 157 212 74.0


line true false branch
62 1306 56 unless $verbose_logger->is_info
63 1 55 if $self->instance->initial_load
69 2 53 ref $cmd ? :
0 55 ref $cmd eq 'ARRAY' ? :
82 0 401 unless defined $steps
86 0 401 if (delete $args{'experience'})
94 0 401 unless $check =~ /yes|no|skip/
97 0 401 ref $steps ? :
129 12 386 if ($ret eq "root")
130 1 11 $caller_is_root ? :
131 0 12 if ($logger->debug)
137 3 383 if (@command)
139 0 3 if ($command[0] =~ m[^/([\w-]+)]) { }
145 1 2 if $check eq "yes"
152 0 385 if (%args)
211 2 1226 if ($leftout)
217 1173 53 wantarray ? :
240 50 1281 if ($logger->is_debug)
246 0 1331 if $cmd =~ /^\s*$/
248 16 1315 if ($cmd eq "!")
256 138 1177 if ($cmd eq "-")
258 132 6 if (defined $parent) { }
267 5 1172 if ($cmd =~ m[^/([\w-]+)])
269 3 2 if ($node->has_element($search)) { }
290 45 1128 if ($logger->is_debug)
291 126 189 defined $_ ? :
295 0 4 unless (defined $element_name or defined $note)
302 0 1173 unless (defined $node)
309 0 1173 unless ($node->isa("Config::Model::Node") or $node->isa("Config::Model::WarpedNode"))
320 4 1169 if (not defined $element_name and defined $note)
325 6 1163 unless ($node->has_element($element_name))
326 4 2 if $check eq "yes"
334 1 1162 unless ($node->is_element_available("name", $element_name))
335 1 0 if $check eq "yes"
343 0 1162 unless ($node->is_element_available("name", $element_name))
344 0 0 if $check eq "yes"
356 0 1162 unless defined $method
363 0 1152 unless defined $ret
366 58 1094 if ($ret eq "error" or $ret eq "done")
370 0 1094 if ($ret eq "root" and not $at_top_level)
394 45 1068 if (defined $note)
395 45 0 if (defined $target_obj) { }
417 0 30 if (@left)
433 1267 2346 if (defined $_)
436 115 1152 if s/^"// and s/"$//
447 0 0 if (defined $note and not defined $action and not defined $subaction)
452 17 0 if (defined $subaction and $subaction eq "=")
462 0 0 if (not defined $action and defined $subaction)
470 0 0 defined $action ? :
474 0 0 unless $_
546 254 42 unless defined $action and $action ne ":"
549 42 0 if ($dispatch)
559 2 1 $before_str =~ s[^/][] && $before_str =~ s[/$][] ? :
568 3 3 if $content{$one_value}
608 1 4 if defined $v and $v eq $rm_val
623 1 4 if defined $v and $v =~ /$rm_val/
660 3 10 if (defined $note and not defined $action and not defined $subaction)
665 35 80 if (defined $action and $action eq ":=" and $cargo_type eq "leaf")
676 26 0 if (not defined $action and defined $subaction and $subaction eq "=" and $cargo_type eq "leaf")
691 28 53 if (my $dispatch = $self->_get_dispatch($element, "list", $cargo_type, $action, $cmd, @f_args))
695 0 53 if (not defined $action and defined $subaction)
704 52 1 if (defined $action and $action eq ":")
709 38 14 if ($cargo_type =~ /node/)
716 3 11 unless defined $subaction
718 11 0 if ($cargo_type =~ /leaf/)
721 11 0 if $self->_load_value($obj, $check, $subaction, $value, $cmdref, $cmd)
726 0 1 defined $action ? :
730 6 1 unless $_
746 4 219 if (defined $note and not defined $action)
752 1 218 unless (defined $action)
755 6 1 unless $_
761 3 215 if ($action eq ":~" or $action eq ":.foreach_match")
765 2 1 if $pattern
766 2 1 $pattern ? :
767 1 2 if ($logger->is_debug)
768 1 0 $pattern ? :
777 9 2 if ($cargo_type =~ /node/) { }
2 0 elsif ($cargo_type =~ /leaf/) { }
794 0 11 if ($ret eq "error")
801 14 201 if (my $dispatch = $self->_get_dispatch($element, "hash", $cargo_type, $action, $cmd, @f_args))
805 0 201 unless (defined $id)
816 114 87 if ($action eq ':' and $cargo_type =~ /node/) { }
83 4 elsif ($action eq ':' and defined $subaction and $cargo_type =~ /leaf/) { }
4 0 elsif ($action eq ':') { }
0 0 elsif ($action) { }
820 0 114 if (defined $subaction)
833 83 0 if $self->_load_value($obj, $check, $subaction, $value, $cmdref, $cmd)
860 5 742 if (defined $action and $element->isa("Config::Model::Value"))
861 4 1 if ($action eq '~') { }
1 0 elsif ($action eq ':') { }
884 10 736 unless defined $subaction
886 20 716 if ($logger->is_debug)
887 20 0 defined $value ? :
894 734 0 if $res
940 11 2 if (defined $orig) { }
949 0 11 if ($res)
970 0 1 if ($value eq "-")
976 1 0 if ($path->is_file) { }
991 6 1 ref $data eq 'HASH' ? :
1003 4 18 if ($new_path->is_file) { }
12 6 elsif ($new_path->is_dir) { }
1011 2 4 unless (defined $file)
1014 0 2 $action ? :
2 0 $subaction ? :
1048 0 840 unless ($element->isa("Config::Model::Value"))
1059 840 0 if ($dispatch) { }