Branch Coverage

blib/lib/Ym/ymcmd.pl
Criterion Covered Total %
branch 0 294 0.0


line true false branch
17 0 0 if (defined $$leaf{$opt}) { }
21 0 0 if (defined $$leaf{'use'})
23 0 0 unless (defined $$tree{'service_templates'}{$template})
45 0 0 if (not ref $opts or ref $opts ne 'HASH')
52 0 0 if (defined $$tree{'hosts'}{$h})
57 0 0 if $verbose
63 0 0 unless defined $$href{$k}
67 0 0 if $processed > 0
98 0 0 unless (defined $$tree{'hosts'}{$h})
103 0 0 if $verbose
114 0 0 if $processed > 0
124 0 0 if (not ref $opts or ref $opts ne 'HASH')
137 0 0 unless (defined $$tree{'hosts'}{$h})
142 0 0 if $verbose
155 0 0 if ref $$tree{'hosts'}{$h}{$k}
160 0 0 if $processed > 0
170 0 0 if ($object =~ m[/(.*)/]o)
176 0 0 unless (defined $$tree{'hosts'}{$object})
181 0 0 if (defined $$tree{'hosts'}{$h})
186 0 0 if $verbose
209 0 0 if $processed > 0
222 0 0 unless $opts
236 0 0 unless (defined $$tree{'hosts'}{$h})
242 0 0 if (defined $$href{'services'} and defined $$href{'services'}{$srv})
249 0 0 if $verbose
251 0 0 unless (defined $$opts{'use'})
261 0 0 if $verbose
263 0 0 if $processed > 0
283 0 0 unless (defined $$tree{'hosts'}{$h})
297 0 0 unless (defined $$href{'services'}{$srv})
302 0 0 if $verbose
307 0 0 if $processed > 0
326 0 0 unless (defined $$tree{'hosts'}{$h})
342 0 0 unless (defined $$srvref{$srv})
347 0 0 if $verbose
364 0 0 if $processed > 0
377 0 0 if ($service =~ m[/(.*)/]o)
383 0 0 if ($obj =~ m[/(.*)/]o and not $obj =~ /^READ_FILE/o)
389 0 0 unless (defined $$tree{'hosts'}{$host})
392 0 0 unless (defined $$tree{'hosts'}{$host}{'services'}{$service})
400 0 0 if (defined $$href{'services'}{$srv})
408 0 0 if $verbose
411 0 0 if $processed > 0
422 0 0 if (not ref $opts or ref $opts ne 'HASH')
428 0 0 if ($obj =~ m[/(.*)/]o and not $obj =~ /^READ_FILE/o)
436 0 0 if (defined $$tree{'commands'}{$cmd})
441 0 0 if $verbose
447 0 0 if $processed > 0
465 0 0 unless (defined $$tree{'commands'}{$cmd})
470 0 0 if $verbose
475 0 0 if $processed > 0
485 0 0 if (not ref $opts or ref $opts ne 'HASH')
497 0 0 unless (defined $$tree{'commands'}{$cmd})
502 0 0 if $verbose
509 0 0 if $processed > 0
520 0 0 unless $opts
522 0 0 if (not ref $opts or ref $opts ne 'HASH')
528 0 0 if ($obj =~ m[/(.*)/]o and not $obj =~ /^READ_FILE/o)
537 0 0 if (defined $$tree{'hostgroups'}{$hg})
542 0 0 if $verbose
548 0 0 unless (defined $$tree{'hostgroups'}{$hg}{'alias'})
553 0 0 if $processed > 0
571 0 0 unless (defined $$tree{'hostgroups'}{$hg})
576 0 0 if $verbose
581 0 0 if $processed > 0
591 0 0 unless $opts
601 0 0 unless (defined $$tree{'hostgroups'}{$hg})
606 0 0 if $verbose
613 0 0 if $processed > 0
622 0 0 unless $opts
624 0 0 unless (defined $$opts{'type'})
628 0 0 unless ($$opts{'type'} =~ /^(hostgroups|contactgroups)$/o)
642 0 0 unless defined $$tree{$t}{$o}
643 0 0 unless defined $$tree{$t}{$o}{'members'}
666 0 0 unless (defined $$dest{$attr})
672 0 0 if ($obj =~ m[/(.*)/]o and not $obj =~ /^READ_FILE/o)
696 0 0 unless (defined $dest and ref $dest)
699 0 0 unless (defined $$dest{$attr})
715 0 0 if (defined $items{$d})
728 0 0 unless (defined $branch and ref $branch)
740 0 0 unless defined $$branch{$obj}
749 0 0 unless (defined $branch and ref $branch)
761 0 0 unless defined $$branch{$obj}
771 0 0 if ($type ne 'hosts' and $type ne 'contacts')
781 0 0 if ($type eq 'hosts') { }
0 0 elsif ($type eq 'contacts') { }
789 0 0 unless defined $$ref{$g}{'members'}
797 0 0 unless (defined $$tree{$type}{$obj})
803 0 0 if (defined $groups{$g}{$obj})
822 0 0 if (defined $$leaf{$opt})
826 0 0 if (defined $$leaf{$key})
828 0 0 if (defined $$branch{$include})
833 0 0 if (defined $res2)
835 0 0 unless defined $$res2{$o}
848 0 0 if defined $$params{'ask'}
849 0 0 if defined $$params{'diff'}
850 0 0 if defined $$params{'dump'}
851 0 0 if defined $$params{'type'}
872 0 0 if ($type)
873 0 0 unless ($type =~ /^(host_templates|service_templates|contacts|contact_templates|timeperiods)$/o)
882 0 0 if (defined $$tree{'hosts'}{$h}{'use'})
885 0 0 if (defined $$tree{'hosts'}{$h}{'contact_groups'})
890 0 0 if (defined $$tree{'hosts'}{$h}{'contacts'})
896 0 0 if (defined $$tree{'hosts'}{$h}{'check_command'})
901 0 0 if (defined $$tree{'hosts'}{$h}{'event_handler'})
904 0 0 if (defined $$tree{'hosts'}{$h}{'check_period'})
907 0 0 if (defined $$tree{'hosts'}{$h}{'notification_period'})
915 0 0 if (defined $$srv{'use'})
918 0 0 if (defined $$srv{'contact_groups'})
924 0 0 if (defined $$srv{'contacts'})
930 0 0 if (defined $$srv{'check_command'})
934 0 0 if (defined $$srv{'event_handler'})
937 0 0 if (defined $$srv{'check_period'})
940 0 0 if (defined $$srv{'notification_period'})
956 0 0 unless defined $$res{$opt}
958 0 0 if ($opt eq 'contacts') { }
0 0 elsif ($opt eq 'contact_groups') { }
0 0 elsif ($opt eq 'use') { }
0 0 elsif ($opt eq 'check_command' or $opt eq 'event_handler') { }
0 0 elsif ($opt eq 'check_period' or $opt eq 'notification_period') { }
989 0 0 unless defined $$res{$opt}
991 0 0 if ($opt eq 'contacts') { }
0 0 elsif ($opt eq 'contact_groups') { }
0 0 elsif ($opt eq 'use') { }
0 0 elsif ($opt eq 'check_command' or $opt eq 'event_handler') { }
0 0 elsif ($opt eq 'check_period' or $opt eq 'notification_period') { }
1025 0 0 unless defined $$res{$opt}
1027 0 0 if ($opt eq 'members') { }
0 0 elsif ($opt eq 'contactgroup_members') { }
1051 0 0 unless defined $$res{$opt}
1053 0 0 if ($opt eq 'host_notification_commands' or $opt eq 'service_notification_commands') { }
0 0 elsif ($opt eq 'contactgroups') { }
0 0 elsif ($opt eq 'use') { }
0 0 elsif ($opt eq 'host_notification_period' or $opt eq 'service_notification_period') { }
1084 0 0 unless defined $$res{$opt}
1086 0 0 if ($opt eq 'host_notification_commands' or $opt eq 'service_notification_commands') { }
0 0 elsif ($opt eq 'contactgroups') { }
0 0 elsif ($opt eq 'use') { }
0 0 elsif ($opt eq 'host_notification_period' or $opt eq 'service_notification_period') { }
1116 0 0 unless defined $$tree{'config'}{$opt}
1131 0 0 unless (defined $used_obj{$k}{$obj})
1139 0 0 if $type and $k ne $type
1140 0 0 if $diff
1142 0 0 if $dump
1143 0 0 if ($ask)
1150 0 0 if $ans eq 'n'
1152 0 0 if $diff