Branch Coverage

blib/lib/Config/Model/BackendMgr.pm
Criterion Covered Total %
branch 76 108 70.3


line true false branch
57 0 93 if $self->rw_config->{'function'}
88 1 0 if (not $dir->is_dir and $w and $args{'auto_create'})
93 4 113 unless ($dir->is_dir)
94 0 4 $w ? :
115 25 117 if (defined $cfo)
117 2 2 $cfo =~ m[^/] ? :
21 4 $args{'root'} ? :
121 7 18 $w ? :
128 101 16 if (defined $args{'file'})
129 17 84 $args{'skip_compute'} ? :
141 66 3 if ($file_path->is_file) { }
175 169 23 if ($c->can($function))
189 35 211 if -f $realfilename
193 0 17 unless (defined $class_to_load)
204 0 17 if ($@)
219 0 99 if %args
231 2 97 if ($rw_config->{'default_layer'})
239 0 7 unless $res or $auto_create_override or $auto_create
254 4 2 if $lc
258 0 2 if %$layered_config
267 2 0 unless ($already_in_layered)
274 2 0 if (not $already_in_layered)
304 0 101 if ($backend_obj->can("suffix"))
314 69 32 if (not $backend_obj->skip_open and $file_ok)
319 2 99 if ($logger->is_info)
320 2 0 defined $file_path ? :
336 0 101 if (ref $error and $error->isa('Config::Model::Exception::Syntax')) { }
0 101 elsif (ref $error and $error->isa('Config::Model::Exception')) { }
0 101 elsif (ref $error) { }
0 101 elsif ($error) { }
338 0 0 unless $error->parsed_file
352 101 0 if ($backend_obj->can("annotation"))
362 0 93 if %args
400 1 51 $force_delete ? :
405 41 11 unless ($backend_class->skip_open)
409 37 15 if ($file_ok)
422 1 51 if ($force_delete) { }
428 0 51 if $error
433 7 44 if $rw_config->{'auto_delete'} and not $backend_class->skip_open
436 0 22 $@ ? :
30 22 defined $res ? :
447 4 3 unless $file_path
450 3 0 if defined $self->node
453 0 2 ref $perl_data eq 'ARRAY' ? :
1 2 ref $perl_data eq 'HASH' ? :
456 2 1 if (not $size)
468 37 0 unless $backup =~ /^\./
473 0 37 if ($do_backup and $file_path->is_file)
474 0 0 unless $file_path->copy($file_path . $backup)
484 14 37 unless defined $file_path
486 0 37 if ($error)
490 0 0 if ref $error and $error->can("rethrow")
495 1 36 if $file_mode
499 0 37 if -z $file_path and not -l $file_path