Branch Coverage

blib/lib/Config/Trivial.pm
Criterion Covered Total %
branch 105 120 87.5


line true false branch
35 7 14 if ($args{'config_file'})
36 2 5 unless set_config_file($object, $args{'config_file'})
50 19 36 if (ref $configuration_file) { }
51 17 2 if (ref $configuration_file eq 'HASH') { }
54 17 2 if ($config_file) { }
55 3 10 unless ($self->_check_file($config_file))
73 23 9 if ($self->_check_file($configuration_file)) { }
93 2 16 if ($$self{'_multi_file'})
99 6 8 if $key
112 2 3 unless ($$self{'_multi_file'})
122 1 2 if $hash
134 3 2 if $key
146 2 11 unless $hash
148 4 7 unless ref $hash
150 6 1 unless ref $hash eq 'HASH'
167 2 17 unless $settings
169 0 17 unless ref $settings eq 'HASH'
174 14 3 if ($file) { }
175 9 5 if ($_file eq $file or $0 eq $file)
186 1 4 if (-e $file)
187 0 1 unless -w $file
189 0 1 unless rename $file, $file . $$self{'_backup_char'}
193 0 5 unless open my $config, '>', $file
199 3 18 if ($setting =~ / /)
200 2 1 if $$self{'_strict'}
202 0 1 if $$self{'_debug'}
206 0 1 if $$settings{$setting}
208 0 1 unless $$settings{$old_setting}
210 1 0 length $old_setting >= 8 ? :
214 4 14 unless $$settings{$setting}
216 1 17 length $setting >= 8 ? :
248 12 62 if ($$self{'_no_check'})
253 2 60 unless $file
255 9 51 unless -e $file
257 2 49 unless -f _
259 0 49 unless -r _
261 7 42 if -z _
275 0 21 unless $self->_check_file($file)
277 0 21 unless open my $config, '<', $file
280 1 20 if ($$self{'_self'})
283 1 117 if /^__DATA__\s*$/
287 49 184 if /^\s*#/
288 57 127 if /^\s*\n/
289 8 119 if /^__END__\s*$/
290 8 111 if (s/\\\s*$//)
292 8 0 unless eof $config
307 18 25 if $$self{'_strict'}
308 2 23 if $$self{'_debug'}
327 111 0 if ($line)
330 111 0 if ($key)
334 20 91 if (exists $$self{'_configuration'}{$key})
335 2 18 if $$self{'_strict'}
337 1 17 if $$self{'_debug'}
340 105 4 if ($key)
341 92 13 if (defined $value) { }
342 26 66 if ($f_key) { }
350 0 13 if $$self{'_debug'}
352 12 1 unless $$self{'_strict'}
366 107 4 if $input =~ m[^([\^\$-=\?/\w.:\\\s\@~\|]+)$]
368 107 4 if $output