Branch Coverage

blib/lib/Config/Model/Role/Grab.pm
Criterion Covered Total %
branch 78 98 79.5


line true false branch
46 2071 1224 if defined $args{'mode'}
47 127 3168 if defined $args{'autoadd'}
49 1275 2020 if defined $args{'grab_non_available'}
53 0 3295 if (defined $args{'strict'})
55 0 0 delete $args{'strict'} ? :
59 0 3295 if %args
62 1 3294 unless ref $steps eq "ARRAY" or not ref $steps
67 1275 2019 ref $steps ? :
68 51 3243 unless $huge_string
103 706 4879 if $mode eq "step_by_step" and @saved > @command
110 449 4430 if ($cmd eq "!")
115 3 4427 if ($cmd =~ /^!([\w:]*)/u)
117 3 0 if (defined $ancestor) { }
122 0 0 if $mode eq "strict"
132 5 4422 if ($cmd =~ /^\?(\w[\w-]*)/u)
139 1570 2852 if ($cmd eq "-")
140 1570 0 if (defined $obj->parent) { }
146 0 0 $mode eq 'adaptative' ? :
150 3 2849 unless ($obj->isa("Config::Model::Node") or $obj->isa("Config::Model::WarpedNode"))
162 10 263 if (defined $arg and $arg =~ /^"/u and $arg =~ /"$/u)
172 206 2643 unless ($obj->has_element("name", $name, "autoadd", $autoadd))
173 87 119 if ($mode eq 'step_by_step') { }
84 35 elsif ($mode eq 'loose') { }
1 34 elsif ($mode eq 'adaptative') { }
174 87 0 wantarray ? :
192 3 2640 unless ($grab_non_available or $obj->is_element_available("name", $name))
198 0 3 if ($mode eq 'step_by_step') { }
3 0 elsif ($mode eq 'loose') { }
0 0 elsif ($mode eq 'adaptative') { }
199 0 0 wantarray ? :
225 11 261 if (defined $action and $autoadd == 0 and not $next_obj->exists($arg))
228 3 8 if $mode eq "loose"
229 8 0 unless $mode eq "adaptative"
238 7 2622 if (defined $action and not $next_obj->isa("Config::Model::AnyId"))
239 7 0 if $mode eq "loose"
250 254 2368 if defined $action
256 68 2945 if (defined $type)
257 31 37 ref $type ? :
259 11 1 if $mode ne "adaptative"
272 1188 1814 wantarray ? :
283 2 2 if $args{'mode'} and $args{'mode'} eq "loose" and not defined $obj
285 1 1 unless ($obj->isa("Config::Model::Value") or $obj->isa("Config::Model::CheckList"))
296 32 340 if ($logger->is_debug)
297 26 6 defined $value ? :
309 713 449 defined $self->parent ? :
318 3 6 if $self->get_type eq "node" and $self->config_class_name eq $class
320 6 0 if defined $self->{'parent'}
336 4 14 if ($obj->isa('Config::Model::Node') and $obj->has_element('name', $search, 'type', $type)) { }
13 1 elsif (defined $obj->parent) { }