Branch Coverage

blib/lib/Config/Manager/Conf.pm
Criterion Covered Total %
branch 130 166 78.3


line true false branch
92 0 16 if (defined($value = $ENV{$key}))
103 1 165 unless ref $self
106 0 282 if not -r $_ and /$PRIVATE/io
107 4 278 unless open FILE, $_
109 0 278 unless close FILE
110 37 241 unless $self->_add($_, \@lines)
121 23 134 unless ref $self
127 116 694 unless ref $self
133 75 735 unless ($state)
134 6 69 if $section eq $ENV and defined $ENV{$key}
135 0 0 if ($section eq $SPECIAL and $key eq $WHOAMI || $key eq $HOME)
139 0 0 unless (($value) = &whoami())
142 0 0 if $key eq $WHOAMI
149 0 0 if ($@)
152 0 0 if $value =~ s/\s+at\s+\S.+$//
155 0 0 if defined $value
160 207 528 if $state == $CACHED
161 6 522 if ($state == $PENDING)
168 480 42 if (defined($value = $self->parse($value, $section))) { }
184 2 1 unless ref $self
187 0 1 unless ($anchor and -f $anchor and -r $anchor and -s $anchor)
193 0 2 unless ($anchor and -f $anchor and -r $anchor and -s $anchor)
213 15299 8667 unless $text =~ /\$/
216 1 8666 if (length $right == 0)
221 464 8202 if ($first eq '$') { }
222 456 8 unless $eval
223 0 464 unless defined($right = $self->parse(substr($right, 1), $eval))
227 50 8152 unless ($var, $right) = $self->_parse_var($first, $right, $eval)
228 4 8148 unless defined($right = $self->parse($right, $eval))
235 2 280 unless ref $self
241 4 2312 unless ref $self
246 1 1 if $section eq $SPECIAL and $source ne $SYS and $key eq $OS || $key eq $PERL || $key eq $SCOPE
255 0 1 unless ref $self
258 1 1 unless $sec =~ /^[a-zA-Z][a-zA-Z0-9_-]*$/ and substr($sec, -1) ne '-'
263 0 13 unless (defined $val)
299 0 0 unless ref $self
302 0 0 if (defined $val)
339 0 168 unless $localtime[6]
371 10239 14171 unless /^\s*(\S)/ and $1 ne '#'
375 1636 12535 if (/^\s*\[\s*([a-zA-Z][a-zA-Z0-9_-]*)\s*\]$/ and substr($1, -1) ne '-')
380 22 12513 unless (/^\s*\$?([a-zA-Z][a-zA-Z0-9_-]*)\s*=\s*(.*?\S.*?)\s*$/ and substr($1, -1) ne '-')
386 1 12512 if $section eq $SPECIAL
388 10 12502 if ($key eq $NEXTCONF and $section eq $scope)
391 14 12498 unless $self->_set($file, $line, $section, $key, $value)
393 233 8 if $next eq ''
394 8 0 if defined($next = $self->parse($next, $scope))
403 0 82 if (defined $section or defined $source or defined $line)
405 37 0 if $source
406 37 0 if $line
407 37 0 if $section
409 37 82 $description ? :
417 2 2188 if $section eq $ENV or $section eq $SPECIAL and $key eq $HOME || $key eq $WHOAMI
421 4 3 if (defined $src and $src eq $source and $src ne $SYS and $src ne $USR)
423 4 0 if ($line and $$self{$section}{$key}{'line'})
428 9 14811 unless (defined $self->parse($value))
431 14578 233 if ($override or not $src)
466 12405 1 unless substr($1, -1) eq '-'
475 1 8407 if (length $rest == 0)
480 1276 7131 if ($first eq '$') { }
7131 0 elsif ($first =~ /^[A-Za-z]$/) { }
482 0 1276 if (length $rest == 0)
503 4210 5268 if ($first eq '[')
504 0 4210 unless ($section, $rest) = $self->_parse_sub(substr($rest, 1), $eval)
505 0 4210 if (length $rest == 0)
510 1 4209 if ($first ne ']')
515 1 4208 if (length $rest == 0)
521 4198 5278 if ($first eq '{') { }
5275 3 elsif ($first =~ /^[A-Za-z]$/) { }
522 1 4197 unless ($variable, $rest) = $self->_parse_sub(substr($rest, 1), $eval)
523 1 4196 if (length $rest == 0)
528 0 4196 if ($first ne '}')
533 81 4115 if ($eval) { }
534 65 16 if defined($value = $self->get($section || $eval, $variable))
536 6 10 if $section or $@ ne _not_found_($eval, $variable)
538 4 6 if defined($value = $self->get($variable))
543 1482 2633 if ($section eq '') { }
548 1 5274 unless ($variable, $rest) = $self->_parse_id($rest, $eval)
549 140 5134 if ($eval) { }
550 106 34 if defined($value = $self->get($section || $eval, $variable))
552 24 10 if $section or $@ ne _not_found_($eval, $variable)
554 4 6 if defined($value = $self->get($variable))
559 3648 1486 if ($section eq '') { }
564 2 1 if ($section eq '') { }