Branch Coverage

blib/lib/Nagios/Downtime.pm
Criterion Covered Total %
branch 0 50 0.0


line true false branch
25 0 0 if @_
106 0 0 if (my(@missing) = _missing($self, ['nagios_cmd_file']))
108 0 0 unless $#_ == 3 and $_
113 0 0 unless open my $CMD_FH, '>>', $$self{'nagios_cmd_file'}
136 0 0 if (my(@missing) = _missing($self, ['nagios_cmd_file']))
138 0 0 unless $#_ == 3 and $_
143 0 0 unless open my $CMD_FH, '>>', $$self{'nagios_cmd_file'}
166 0 0 if (my(@missing) = _missing($self, ['nagios_cmd_file', 'nagios_hostgroups_file', 'downtime_dat_file']))
168 0 0 unless my $hostgroup_name = shift()
171 0 0 unless open my $CMD_FH, '>>', $$self{'nagios_cmd_file'}
240 0 0 if (my(@missing) = _missing($self, ['nagios_cmd_file', 'downtime_dat_file']))
242 0 0 unless my $host_name = shift()
245 0 0 unless open my $CMD_FH, '>>', $$self{'nagios_cmd_file'}
255 0 0 if (not $$self{$_})
261 0 0 unless $#_ == 1 and $_
268 0 0 if ($$_{'hostgroup_name'} eq $hostgroup_name)
274 0 0 unless $#_ == 1 and $_
281 0 0 if ($$_{'host_name'} eq $host_name)
287 0 0 unless $#_ == 1 and $_
291 0 0 unless open my $DT_DAT_FH, '<', $file_to_read
293 0 0 if /^#/
294 0 0 if /{$/
295 0 0 if /^\s*$/
296 0 0 if (/}$/)
297 0 0 if /^\s*(.+?)(=|\s+)(.+)\s*$/