Branch Coverage

blib/lib/Nagios/Report.pm
Criterion Covered Total %
branch 29 134 21.6


line true false branch
286 5 0 $rpt_period ? :
287 0 5 $tme_period ? :
288 0 5 $rep_type ? :
290 0 5 if $pre_filter and ref $pre_filter ne 'CODE'
306 0 5 if (my($s, $e) = $time_period =~ /^([^-]+)-([^-]+)$/) { }
313 5 0 exists $Nagios::Report::stime_etime{$time_period} ? :
318 5 0 if $source_tag =~ /^dev_debug/
322 0 5 unless $source_tag and $data
328 0 5 unless $server
341 5 0 $report_type eq 'host' ? :
344 0 0 $$me{'SOURCE_TAG'} eq 'local_cgi' ? :
5 0 $$me{'SOURCE_TAG'} eq 'dev_debug' ? :
0 5 $$me{'SOURCE_TAG'} eq 'web_page' ? :
369 0 20 if ($report_type eq 'service')
375 20 0 $report_type eq 'host' ? :
377 0 20 if $report_type eq 'service'
383 20 0 $report_type eq 'host' ? :
385 0 20 if $report_type eq 'service'
395 0 20 unless &$pre_filter(%F)
419 0 0 if @_
460 0 0 if $these_fields and ref $these_fields ne 'ARRAY'
463 0 0 if $select_these and ref $select_these ne 'CODE'
466 0 0 if $this_order and ref $this_order ne 'CODE'
469 0 0 if $alter and ref $alter ne 'CODE'
476 0 0 scalar @$these_fields ? :
503 0 0 unless @avail_recs
507 0 0 unless $$me{'SOURCE_TAG'} =~ /^(?:web_page|local_cgi)/
510 0 0 if ($add_downs)
515 0 0 unless grep(($_ eq $ofn[0]), @field_names)
521 0 0 if ($alter)
529 0 0 unless grep(($_ eq $afn[0]), @field_names)
545 0 0 $add_downs ? :
546 0 0 if $alter
576 0 0 if $@
580 0 0 unless $workbook
613 0 0 (($h) = $c =~ m[^http://.+?host=([^&]+)&]) ? :
614 0 0 if $len >= $max_col_width[$col]
633 0 0 if (my($h) = $c =~ m[^http://.+?host=([^&]+)&]) { }
634 0 0 $h ? :
644 0 0 if $chart_details
695 0 0 unless $format++
724 2 21 unless $d
732 32 48 if $r > 0
763 0 0 if ($fields_remaining <= 0) { }
805 1 6 unless @_
811 29 1 if $_ >= $max
834 0 0 if ($sort_parms{'alpha'}) { }
847 0 0 $sort_parms{'ascend'} ? :
869 0 0 $sort_parms{'ascend'} ? :
880 0 0 unless $user
898 0 0 wantarray ? :
906 0 0 unless $user and $pass
925 0 0 if ($avail_rep =~ //i) { }
968 0 0 if /HOST UP|SERVICE OK|HOST DOWNTIME END/
977 0 0 if &before_start($down, $start_time)
984 0 0 unless @downs
994 1 2 $t1 < $t2 ? :
1003 3 0 if (($dd, $mm, $yyyy, $h, $m, $s) = / (\d+)-(\d+)-(\d+) \s+ (\d+):(\d+):(\d+) /x) { }
0 0 elsif (($mon, $dd, $h, $m, $s, $yyyy) = /\w{3} (\w{3})\s+(\d+) (\d+):(\d+):(\d+) \w{3} (\d{4})/) { }
0 0 elsif (/now/) { }
1050 0 0 unless exists $$me{'AVAIL_REPORTS'}{$rep_period}
1056 0 0 wantarray ? :
1063 0 0 unless exists $$me{'REPORTS'}{$rep_period}
1069 0 0 wantarray ? :
1077 0 0 if $@
1112 0 0 unless ref $chart eq 'HASH'
1115 0 0 unless exists $$chart{'template'} and $$chart{'template'} and -e $$chart{'template'} and -s $$chart{'template'}