Branch Coverage

blib/lib/Config/Trivial/JSON.pm
Criterion Covered Total %
branch 34 40 85.0


line true false branch
28 2 5 if ($$self{'_self'} and $file =~ /\(eval / || $file =~ /base.pm/ or $_file eq $file or $0 eq $file)
37 1 4 if (-e $file)
38 0 1 unless -w $file
40 0 1 unless rename $file, $file . $$self{'_backup_char'}
46 2 3 unless ($settings and ref $settings eq 'HASH')
52 3 0 if ($json_text) { }
53 0 3 unless open my $json_file, '>', $file
74 4 11 if ($$self{'_config_file'} and $$self{'_json_file'}) { }
75 2 2 if ($$self{'_config_file'} eq $$self{'_json_file'}) { }
1 1 elsif ((stat $$self{'_config_file'})[9] > (stat $$self{'_json_file'})[9]) { }
81 1 0 if $key
89 2 9 if ($$self{'_json_file'}) { }
94 1 7 if ($$self{'_self'} and defined $$self{'_config_file'} and $$self{'_config_file'} =~ /\(eval / || $$self{'_config_file'} =~ /base.pm/ or $_file eq $$self{'_config_file'} or $0 eq $$self{'_config_file'})
110 3 9 unless $self->_check_file($file)
112 0 9 unless open my $json_file, '<', $file
122 1 8 if ($@)
127 1 7 unless ($retrieved_hash_ref and ref $retrieved_hash_ref eq 'HASH')
134 5 2 if $key
146 5 1 if ($self->_check_file($configuration_file)) { }
149 3 2 if ($$self{'_config_file'} =~ /\(eval / or $$self{'_config_file'} =~ /base.pm/)