Branch Coverage

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


line true false branch
46 2071 1244 if defined $args{'mode'}
47 127 3188 if defined $args{'autoadd'}
49 1275 2040 if defined $args{'grab_non_available'}
53 0 3315 if (defined $args{'strict'})
55 0 0 delete $args{'strict'} ? :
59 0 3315 if %args
62 1 3314 unless ref $steps eq "ARRAY" or not ref $steps
67 1275 2039 ref $steps ? :
68 51 3263 unless $huge_string
103 706 4907 if $mode eq "step_by_step" and @saved > @command
110 449 4458 if ($cmd eq "!")
115 3 4455 if ($cmd =~ /^!([\w:]*)/u)
117 3 0 if (defined $ancestor) { }
122 0 0 if $mode eq "strict"
132 5 4450 if ($cmd =~ /^\?(\w[\w-]*)/u)
139 1570 2880 if ($cmd eq "-")
140 1570 0 if (defined $obj->parent) { }
146 0 0 $mode eq 'adaptative' ? :
150 3 2877 unless ($obj->isa("Config::Model::Node") or $obj->isa("Config::Model::WarpedNode"))
162 10 283 if (defined $arg and $arg =~ /^"/u and $arg =~ /"$/u)
172 206 2671 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 2668 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 281 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 2650 if (defined $action and not $next_obj->isa("Config::Model::AnyId"))
239 7 0 if $mode eq "loose"
250 274 2376 if defined $action
256 68 2965 if (defined $type)
257 31 37 ref $type ? :
259 11 1 if $mode ne "adaptative"
272 1188 1834 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 360 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) { }