Branch Coverage

blib/lib/Config/apiLayers.pm
Criterion Covered Total %
branch 44 102 43.1


line true false branch
26 0 1 if (not defined $validator) { }
1 0 elsif (ref $validator eq 'CODE') { }
0 0 elsif (not ref $validator) { }
33 0 0 if $value =~ /$validator/
39 0 3 if $self->{'DEBUG'}
43 0 6 if $self->{'DEBUG'}
47 1 5 if (defined $value) { }
49 1 0 if (my $valid = &$f_validator($self, $name, $validator, $value)) { }
62 1 4 if (ref $value eq 'CODE') { }
70 5 2 if (exists $layer->{$name})
117 3 0 if defined $validator
118 2 1 if defined $getoptlong
119 2 1 if defined $description
121 0 3 unless defined $attr_func
123 3 0 if ($autoproto == 1)
129 3 0 if (exists $attr_hash->{'name'}) { }
141 1 0 if (exists $args->{'attributes'} and ref $args->{'attributes'} eq 'ARRAY') { }
0 0 elsif (exists $args->{'attributes'} and ref $args->{'attributes'} eq 'HASH') { }
143 3 0 if (ref $attr eq 'HASH') { }
167 1 1 ref $self->{$Config::apiLayers::CXLDATA} eq 'ARRAY' ? :
168 0 2 exists $args->{'index'} ? :
169 0 2 unless (exists $args->{'data'})
170 0 0 if (defined $self->{$Config::apiLayers::CXLDATA}[$layer_idx]) { }
179 0 4 unless grep {/^$key$/;} @{$attrs;}
191 1 0 if (exists $args->{'data'})
193 0 1 unless grep {/^$key$/;} @{$attrs;}
194 0 1 unless ($self->apicall($key, $args->{'data'}{$key}))
199 0 1 if $errors >= 1
210 1 1 if (exists $args->{'cfg'} and $args->{'cfg'} eq 'getoptlong') { }
1 0 elsif (exists $args->{'cfg'} and $args->{'cfg'} eq 'descriptions') { }
0 0 elsif (exists $args->{'data'}) { }
213 1 2 unless defined $self->{$Config::apiLayers::CXLCFG}{'getoptlong'}{$attr_name}
220 1 2 unless defined $self->{$Config::apiLayers::CXLCFG}{'description'}{$attr_name}
228 0 0 if (not ref $args->{'data'} and $args->{'data'} >= $firstLayer and $args->{'data'} <= $lastLayer) { }
0 0 elsif (ref $args->{'data'} eq 'ARRAY') { }
238 0 0 unless exists $self->{$Config::apiLayers::CXLDATA}[$layer_idx]{$key}
242 0 0 if keys %{$export;}
257 0 1 if (ref $self->{$Config::apiLayers::CXLDATA} ne 'ARRAY')
261 0 1 exists $args->{'index'} ? :
267 0 1 if (exists $args->{'data'})
277 3 0 if (defined $attr_name) { }
278 3 0 if exists $self->{$Config::apiLayers::CXLCFG}{'api'}{$attr_name}
281 0 0 wantarray ? :
288 3 0 if (defined $attr_name)
292 3 0 if defined $subref
306 0 0 unless defined $p
307 0 0 if ($path =~ m[.+/$])
313 0 0 if (not defined $path) { }
339 0 0 if ($item =~ m[^/]) { }
351 0 0 if (-d $path)
361 0 0 unless defined $baseDir