Branch Coverage

blib/lib/ConfigReader/Simple.pm
Criterion Covered Total %
branch 72 72 100.0


line true false branch
168 5 6 unless defined $keyref
170 7 4 defined $filename ? :
211 5 12 unless defined $args{'Keys'}
214 2 15 unless ref $args{'Files'} eq ref []
216 1 14 unless ref $args{'Keys'} eq ref []
225 1 1 if not $result and $ConfigReader::Simple::Die
227 1 10 unless $result
260 6 3 unless defined $args{'Keys'}
263 2 7 unless ref $args{'Strings'} eq ref []
265 1 6 unless ref $args{'Keys'} eq ref []
273 1 5 unless ref $string_ref eq ref \""
294 2 2 unless $self->parse($filename)
357 7 13 unless (open CONFIG, $file)
359 2 5 if $ConfigReader::Simple::Warn
366 19 90 if (s/\\ \s* $//x)
368 18 1 unless eof CONFIG
372 20 71 if /^\s*(#|$)/
407 3 14 if ($line =~ s/\\ \s* $//x)
411 2 1 unless @lines == 0
418 2 13 if $line =~ /^\s*(#|$)/
459 3 19 if (ref $value)
461 1 2 if ($ConfigReader::Simple::Warn) { }
1 1 elsif ($ConfigReader::Simple::Die) { }
488 1 1 unless $self->exists($key)
506 1 1 unless $self->exists($key)
616 1 8 if (@args == 0)
621 1 7 if (@args == 1)
625 1 7 unless (@args % 2 == 0)
630 4 4 unless ref $value eq ref []
635 1 3 unless $self->_save($file, $hash{$file})
644 2 5 unless (ref $directives eq ref [])
650 1 4 unless (open $fh, ">", $file)
679 85 1 if $_[0] =~ / ^\s* ( [^\s=]+ ) \s* [=]? \s* (['"]?) (.*?) \2 \s* $/x
722 2 20 unless exists $self->{'validkeys'}
725 1 19 unless ref $self->{'validkeys'} eq ref []
730 1 18 if @missing