Branch Coverage

blib/lib/Nagios/Plugin/Functions.pm
Criterion Covered Total %
branch 70 88 79.5


line true false branch
50 9 0 @_ ? :
54 10 0 @_ ? :
61 4 65 if defined $$arg{'shortname'}
62 1 64 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 0 0 if grep {$_ == 2;} @_
81 0 0 if grep {$_ == 1;} @_
82 0 0 if grep {$_ == 3;} @_
83 0 0 if grep {$_ == 4;} @_
84 0 0 if grep {$_ == 0;} @_
93 6 84 if (defined $code and $code eq 'return_code' || $code eq 'message')
95 6 0 if (int @_ / 2 != @_ / 2 and ref $_[$#_]) { }
107 30 62 if defined $code and exists $ERRORS{$code}
110 10 82 unless defined $code and exists $STATUS_TEXT{$code}
111 4 88 unless defined $message
112 0 92 if (ref $message and ref $message eq 'ARRAY') { }
121 84 8 if defined $message and $message ne ''
122 48 44 $$arg{'plugin'} ? :
124 92 0 if $shortname
125 48 44 if ($$arg{'plugin'})
127 6 42 if $plugin->perfdata and $plugin->all_perfoutput
133 89 3 if ($_fake_exit)
144 15 1 if ($_use_die)
147 0 32 unless @_
148 15 17 if ($_[3] =~ /die/)
164 6 49 if (defined $arg1 and $arg1 eq 'return_code' || $arg1 eq 'message') { }
20 29 elsif (defined $arg1 and exists $ERRORS{$arg1} || exists $STATUS_TEXT{$arg1}) { }
21 8 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'}) { }
225 26 10 @$_ ? :
226 8 2 ref $arg{'ok'} ? :
10 2 $arg{'ok'} ? :
234 13 19 if $code == 2
236 10 22 if $code == 1
238 8 1 ref $arg{'ok'} ? :
27 5 if $arg{'ok'}