Branch Coverage

blib/lib/Nagios/Monitoring/Plugin/Functions.pm
Criterion Covered Total %
branch 79 88 89.7


line true false branch
50 7 0 @_ ? :
54 8 0 @_ ? :
61 4 22 if defined $arg->{'shortname'}
62 1 21 if defined $arg->{'plugin'}
71 1 6 if grep {$_ == 2;} @_
72 3 3 if grep {$_ == 1;} @_
73 2 1 if grep {$_ == 0;} @_
74 0 1 if grep {$_ == 3;} @_
75 0 1 if grep {$_ == 4;} @_
80 1 6 if grep {$_ == 2;} @_
81 3 3 if grep {$_ == 1;} @_
82 1 2 if grep {$_ == 3;} @_
83 0 2 if grep {$_ == 4;} @_
84 1 1 if grep {$_ == 0;} @_
93 6 43 if (defined $code and $code eq 'return_code' || $code eq 'message')
95 6 0 if (int @_ / 2 != @_ / 2 and ref $_[$#_]) { }
107 15 34 if defined $code and exists $ERRORS{$code}
110 5 45 unless defined $code and exists $STATUS_TEXT{$code}
111 2 48 unless defined $message
112 0 50 if (ref $message and ref $message eq 'ARRAY') { }
121 46 4 if defined $message and $message ne ''
122 48 2 $arg->{'plugin'} ? :
124 50 0 if $shortname
125 48 2 if ($arg->{'plugin'})
127 6 42 if $plugin->perfdata and $plugin->all_perfoutput
133 48 2 if ($_fake_exit)
144 15 1 if ($_use_die)
147 0 31 unless @_
148 15 16 if ($_[3] =~ /die/)
164 6 25 if (defined $arg1 and $arg1 eq 'return_code' || $arg1 eq 'message') { }
10 15 elsif (defined $arg1 and exists $ERRORS{$arg1} || exists $STATUS_TEXT{$arg1}) { }
11 4 elsif (defined $arg2 and exists $ERRORS{$arg2} || exists $STATUS_TEXT{$arg2}) { }
214 2 48 unless defined $arg{'join'}
218 21 29 if @{$arg{'critical'};}
219 37 13 if @{$arg{'warning'};}
220 6 44 unless wantarray
224 12 32 if ($arg{'join_all'}) { }
226 26 10 @$_ ? :
229 8 2 ref $arg{'ok'} ? :
10 2 $arg{'ok'} ? :
234 13 19 if $code == 2
236 10 22 if $code == 1
239 8 1 ref $arg{'ok'} ? :
27 5 if $arg{'ok'}