Branch Coverage

blib/lib/Config/Model/Itself.pm
Criterion Covered Total %
branch 61 112 54.4


line true false branch
59 0 0 if ($self->{'meta_root'}) { }
0 0 elsif ($self->{'meta_instance'}) { }
82 0 0 if ($self->{'meta_root'}) { }
118 0 0 unless ($p->is_dir)
119 0 0 unless $p->mkpath(0, 493)
159 3 3829 unless $p =~ /^class/
160 0 3829 unless $args{'index'}
161 2973 856 if $self->class_was_changed($args{'index'})
199 0 3 if $file =~ m[/README]
200 0 3 if $file =~ /(~|\.bak|\.orig)$/
201 0 3 if $application and $file->basename ne $application
212 0 6 unless $v
219 0 3 $force_load ? :
236 0 7 if ($args{'read_from'})
238 0 0 unless $read_from->is_dir
240 0 0 unless $model_dir->is_dir
249 0 7 if %args
261 63 0 if $_->is_file and /\.pl$/ and m[$read_dir/$root_model_file\b] and not m[\.d/]
281 21 42 $legacy ? :
291 0 63 if $file eq $rel_file
307 123 0 unless Compare($raw_model, $new_model)
312 3795 0 unless defined $moved_data
333 0 351 unless defined $new_model->{$_} and $new_model->{$_} ne ''
352 2 5 $force_load ? :
367 918 63 if ($l =~ /^\s*#/ or $l =~ /^\s*$/) { }
389 0 246 if ($ref and ref $ref eq 'ARRAY')
390 0 0 if (@$ref == 1) { }
0 0 elsif (@$ref > 1) { }
400 3 120 if ($model->{'read_config'} and not $multi_backend)
405 3 120 if ($model->{'write_config'} and not $multi_backend)
407 3 0 if (not $multi_backend)
425 0 66 unless $class_element->defined($class_name)
436 66 0 if keys %$model
455 2 18 if $name eq 'category'
458 14 4 unless defined $v
474 0 4 if %args
512 65 0 if $self->class_needs_write($class_name)
516 0 45 unless $file_needs_write
522 65 0 if defined $model and keys %$model
530 0 45 unless @data
545 0 2 if %args
550 0 2 unless $model->{'class'}
573 0 1 if %args
578 2 0 if -f $_ and not /~$/ and not $n =~ /CVS/ and not $n =~ /.(svn|orig|pod)$/ and $n =~ m[\.d/$plugin_name]
591 2 0 if not $load_file =~ m[^/] and -e $load_file
595 0 2 unless ($plugin)
596 0 0 if ($@) { }
0 0 elsif (not defined $plugin) { }
628 8 41 unless (-d $wr_dir)
629 0 8 unless mkpath($wr_dir, 0, 493)
683 10 31 if (@include and not defined $inc_after)
687 2 39 unless @elts
693 8 142 if (@include and defined $inc_after and $inc_after eq $elt_name)
719 30 95 if ($type =~ /^list|hash$/) { }
765 2895 28 unless $element_name eq 'config_class_name'
767 7 21 unless $v