Branch Coverage

blib/lib/AppConfig/File.pm
Criterion Covered Total %
branch 66 122 54.1


line true false branch
47 0 5 if @_
94 5 0 unless defined $errhandler
101 0 0 ref $file ? :
120 5 0 if (ref $file) { }
124 0 5 if $debug
128 0 0 unless (open FH, $file)
138 0 0 if $debug
152 1 86 if (s/\\$// and not eof $handle)
161 24 62 if /^\s*$/
168 3 59 if (/^\[([^\]]+)\]$/)
170 0 3 if $debug
175 59 0 if (/^([^\s=]+)(?:(?:(?:\s*=\s*)|\s+)(.*))?/) { }
178 51 8 if (defined $value)
180 6 45 if ($value =~ /^([^\s=]+\s*=)?\s*<<(['"]?)(\S+)\2$/) { }
182 1 5 defined $1 ? :
184 5 11 if $_ eq $boundary
199 16 43 if length $prefix
204 0 59 unless ($state->_exists($variable) or $state->set($variable, 1))
207 0 0 if $pedantic
214 2 57 if ($flag eq '-') { }
2 55 elsif ($flag eq '+') { }
220 2 0 unless defined $value
224 33 24 if ($nargs) { }
225 33 0 if (defined $value and length $value) { }
230 0 33 unless ($self->_expand(\$value, $state->_expand($variable), $prefix))
232 0 0 if $debug
235 0 0 if $pedantic
241 0 0 if $pedantic
249 20 4 if (defined $value) { }
251 5 15 if $value =~ /off/i
253 10 10 if $value
259 0 24 if $debug
264 0 57 unless ($state->set($variable, $value))
266 0 0 if $pedantic
280 0 5 $warnings ? :
317 0 33 unless defined $prefix
323 6 27 unless $expand and defined $$value
327 2 25 unless ($sys = $$self{'SYS'})
332 0 27 if $debug
340 25 2 if ($expand & 1)
347 0 7 defined $1 ? :
350 6 1 if ($state->_exists($var)) { }
1 0 elsif (length $prefix and $state->_exists($prefix . '_' . $var)) { }
355 0 1 if $debug
362 0 0 if ($expand & 8)
378 0 25 if $warnings and $pedantic
386 24 3 if ($expand & 2)
393 0 2 if (defined($var = $1)) { }
395 0 0 if ($sys->can_getpwnam)
404 0 2 unless (defined $val)
406 0 0 if ($expand & 8)
407 0 0 defined $var ? :
421 0 24 if $warnings and $pedantic
429 26 1 if ($expand & 4)
437 4 0 if (exists $ENV{$var}) { }
0 0 elsif ($var eq 'HOME') { }
445 0 0 if ($expand & 8)
458 0 26 if $warnings and $pedantic
462 0 27 if $debug
465 0 27 $warnings ? :
480 0 0 defined $$self{$key} ? :