Branch Coverage

blib/lib/Config/App.pm
Criterion Covered Total %
branch 64 88 72.7


line true false branch
27 10 0 unless grep {$_ eq $lib;} @INC
35 1 4 @_ == 1 ? :
0 5 @_ > 1 ? :
40 5 0 if (-f $config_file)
57 1 4 if $error
66 1 15 if not $no_singleton and $singleton
78 4 10 unless $no_singleton
80 1 13 if (my $libs = $self->get('libs'))
81 1 0 ref $libs eq 'ARRAY' ? :
114 0 1 $error ? :
131 1 26 unless $raw_config
133 26 0 if $root_dir
135 1 25 ref $location ? :
136 1 25 if (grep {$_ eq $include;} @{$$conf{'config_app'}{'includes'};}) { }
140 0 1 ref $location ? :
151 24 24 $_[0] ? :
154 3 45 if $set->{$include}
155 7 41 if $conf->{$include}
156 0 48 if $set->{$optional}
157 2 46 if $conf->{$optional}
189 2 25 if (ref $location)
194 0 27 if ('URI'->new($location)->scheme) { }
203 0 0 if ($res->is_success) { }
207 0 0 if ($optional) { }
221 26 1 if (-f $config_file) { }
222 1 0 if ($optional) { }
230 0 26 unless open my $config_fh, '<', $config_file
245 31 36 if -f $config_file
259 19 6 if ($location =~ /\.yaml$/ or $location =~ /\.yml$/) { }
5 1 elsif ($location =~ /\.json$/ or $location =~ /\.js$/) { }
271 5 20 if ($type eq 'json') { }
289 1 24 if ($error)
294 1 0 unless $config
298 24 0 if $config
307 0 36 unless $source
309 33 0 if (not $is_deep_call and ref $merge eq 'HASH' and ref $source eq 'HASH')
310 3 30 if (my $libs = delete $source->{'libs'})
311 1 2 if (not exists $merge->{'libs'}) { }
1 1 elsif (ref $merge->{'libs'} eq 'ARRAY') { }
315 0 1 ref $libs eq 'ARRAY' ? :
319 1 0 ref $libs eq 'ARRAY' ? :
325 36 0 if (ref $merge eq 'HASH') { }
0 0 elsif (ref $merge eq 'ARRAY') { }
327 3 50 if (exists $merge->{$key} and ref $merge->{$key} eq 'HASH' and ref $source->{$key} eq 'HASH') { }