Branch Coverage

blib/lib/Config/INIPlus.pm
Criterion Covered Total %
branch 97 158 61.3


line true false branch
168 4 16 unless (defined $p{'debug'})
169 2 18 unless (defined $p{'file'})
170 4 16 unless (defined $p{'_mode'})
173 4 16 if ($p{'_mode'} == 0 and not defined $p{'fh'})
174 2 2 if (defined $p{'string'}) { }
2 0 elsif ($p{'file'}) { }
178 0 2 unless (defined $p{'fh'})
186 0 2 unless (defined $p{'fh'})
196 0 20 unless (defined $p{'fh'} and eval { do { $p{'fh'}->can('getline') } })
216 0 136 if $p{'debug'}
218 88 48 if ($p{'_mode'} == 0 or $p{'_mode'} == 1) { }
36 12 elsif ($p{'_mode'} == 2) { }
12 0 elsif ($p{'_mode'} == 3) { }
221 12 76 unless (defined $struct)
226 24 64 if ($line =~ / ^ $osp $eolc $ /x) { }
8 56 elsif ($line =~ / ^ $osp \[ $osp (.+) $osp \] $osp $eolc $ /x) { }
4 52 elsif ($line =~ / ^ $osp (.*?) $osp \{ $osp $eolc $ /x) { }
4 48 elsif ($line =~ / ^ $osp (.*?) $osp \( $osp $eolc $ /x) { }
4 44 elsif ($line =~ / ^ $osp (.*?) $osp \= $osp \"( [^"]* $eol ) $ /x) { }
3 41 elsif ($line =~ / ^ $osp (.*?) $osp \= $osp \"([^"]+)\" $eolc $ /x) { }
33 8 elsif ($line =~ / ^ $osp (.*?) $osp \= $osp (.*?) $osp $eolc $ /x) { }
8 0 elsif ($line =~ / ^ $osp ( \} | \) )$osp $eolc $ /x) { }
227 0 24 if $p{'debug'}
235 0 8 if ($section =~ /^_/)
239 8 0 if ($p{'_mode'} == 0) { }
277 8 0 if ($p{'_mode'} != 0 and $char eq '}')
280 0 8 if $p{'debug'}
294 48 32 if (defined $name and defined $val)
295 16 32 if ($p{'_mode'} == 0 and $section) { }
307 4 32 unless (defined $struct)
311 0 36 if ($line =~ / ^ $osp $eolc $/x) { }
0 36 elsif ($line =~ / ^ $osp \[ $osp (.+) $osp \] $osp $eolc $ /x) { }
4 32 elsif ($line =~ / ^ $osp \{ $osp $eolc $ /x) { }
0 32 elsif ($line =~ / ^ $osp \( $osp $eolc $ /x) { }
0 32 elsif ($line =~ / ^ $osp \"( [^"]* $eol ) $ /x) { }
0 32 elsif ($line =~ / ^ $osp \"([^"]+)\" $osp $eolc $ /x) { }
0 32 elsif ($line =~ / ^ $osp \} $osp $eolc $ /x) { }
4 28 elsif ($line =~ / ^ $osp \) $osp $eolc $ /x) { }
28 0 elsif ($line =~ / ^ $osp (.*?) $osp $eolc $ /x) { }
312 0 0 if $p{'debug'}
341 0 4 if $p{'debug'}
358 4 8 unless (defined $struct)
360 4 8 if ($line =~ / ^ ([^"]*) " $osp $eolc $ /x) { }
0 8 elsif ($line =~ /"/) { }
380 0 4 if ($p{'_mode'} != 0)
388 0 8 if exists $sections_index{$section}
434 0 0 if ($file)
452 16 20 if $key =~ /^_/
472 0 0 if (defined $section and $section ne '') { }
494 0 0 if (not defined $name or $name eq '')
497 0 0 unless (defined $val)
500 0 0 if ($name =~ /^_/)
504 0 0 if (defined $section and $section ne '') { }
525 0 0 if (not defined $name or $name eq '')
529 0 0 if (defined $section and $section ne '') { }
549 0 0 if (not defined $section or $section eq '')
552 0 0 if ($section =~ /^_/)
556 0 0 if ($self->section_exists($section))
559 0 0 if (defined $$self{$section}) { }
581 0 5 if (not defined $section or $section eq '')
612 0 0 if (not defined $section or $section eq '')
651 0 1 unless (defined $file and $file)
653 0 0 unless (defined $file and $file)
676 2 3 unless (defined $p{'indent_level'})
680 5 0 unless (defined $p{'indent_string'})
690 4 1 if ($at_root or ref $obj eq 'HASH') { }
1 0 elsif (ref $obj eq 'ARRAY') { }
692 4 13 if $key =~ /^_/
693 1 12 if $at_root and $obj->section_exists($key)
695 1 11 if (ref $value eq 'ARRAY') { }
1 10 elsif (ref $value eq 'HASH') { }
0 10 elsif ($value =~ /"/) { }
1 9 elsif ($value =~ /$eol/) { }
718 1 3 if ($at_root)
721 1 1 if (defined $$obj{$section})
730 0 8 if (ref $value eq 'ARRAY') { }
1 7 elsif (ref $value eq 'HASH') { }
0 7 elsif ($value =~ /"/) { }
0 7 elsif ($value =~ /$eol/) { }