Branch Coverage

blib/lib/Ym/ymcommon.pl
Criterion Covered Total %
branch 0 110 0.0


line true false branch
12 0 0 unless $tree
21 0 0 unless defined $tree
31 0 0 unless defined $tree
34 0 0 unless $opts
45 0 0 unless defined $tree
48 0 0 unless defined $opt
51 0 0 if (defined $$tree{'meta'}{$opt}) { }
66 0 0 unless defined $tree
78 0 0 unless -e $file
82 0 0 if ($mtime < $tree_mod_time or $configs_gen_time > 0 and $mtime > $configs_gen_time)
97 0 0 unless (defined $grp_branch and defined $$grp_branch{$group})
121 0 0 unless ($f =~ /^READ_FILE=(.*)/o)
129 0 0 unless open LIST, "<$fname"
143 0 0 unless $opts
149 0 0 unless (defined $obj_ref or defined $grp_ref)
154 0 0 if (defined $obj_ref and !ref($obj_ref) || ref $obj_ref ne 'ARRAY')
160 0 0 if (defined $grp_ref and !ref($grp_ref) || ref $grp_ref ne 'ARRAY')
167 0 0 if (defined $obj_ref)
168 0 0 if (defined $$opts{'allow_regexp_in_obj'} and not defined $$opts{'obj_branch'})
175 0 0 if (defined $grp_ref and not defined $$opts{'grp_branch'})
185 0 0 if (defined $obj_ref)
190 0 0 if ($item =~ m[^/(.*)/]o) { }
193 0 0 if $verbose
195 0 0 unless ($$opts{'allow_regex_in_obj'})
201 0 0 if ($obj =~ /$regex/)
207 0 0 if ($item =~ /^READ_FILE/o) { }
209 0 0 if $verbose
225 0 0 if (defined $grp_ref)
231 0 0 if ($item =~ m[^/(.*)/]o)
236 0 0 if ($item =~ /^READ_FILE/o) { }
238 0 0 if $verbose
267 0 0 if $class eq 'config' or $class eq 'meta'
272 0 0 if ($count eq 0)
276 0 0 if ($class =~ /hosts|service_dependencies/o)
278 0 0 $class eq 'hosts' ? :
282 0 0 if ($count eq 0)
302 0 0 unless (defined $$two{$class}{$object})
307 0 0 if ($class eq 'hosts')
311 0 0 unless (defined $$two{$class}{$object}{'services'}{$srv})
325 0 0 if (ref $ref ne 'ARRAY')
330 0 0 if (scalar @$ref > 0)
350 0 0 if (-e $file) { }
351 0 0 if $Ym::VERBOSE
352 0 0 unless $ref = Storable::retrieve($file)
356 0 0 if $Ym::VERBOSE
364 0 0 unless my $clone = &Storable::dclone($tree)
375 0 0 unless Storable::store($tree, $tmp_file)
378 0 0 unless rename $tmp_file, $file
386 0 0 unless $opts
391 0 0 unless (defined $Ym::BACKUP_PATH)
395 0 0 unless (-d $Ym::BACKUP_PATH and -w $Ym::BACKUP_PATH)
401 0 0 unless opendir DIR, $Ym::NAGIOS_CFG_DIR
404 0 0 if /^[^.]/o and /\.cfg$/o
408 0 0 unless mkdir $bckp_dir
412 0 0 unless File::Copy::copy("$Ym::NAGIOS_CFG_DIR/$f", "$bckp_dir/$f")