Branch Coverage

blib/lib/Monitoring/Icinga2/Client/Simple.pm
Criterion Covered Total %
branch 37 40 100.0


line true false branch
16 1 33 if @_ % 2
22 30 2 if (defined $ua)
26 0 30 unless defined $self->{'ua'}
42 1 4 if ($args{'service'} and not $args{'services'})
48 2 2 if $args{'services'}
70 1 2 if defined $args{'name'}
75 1 1 if defined $args{'service'}
84 2 1 if (ref $args) { }
108 1 2 defined $args{'host'} ? :
127 2 1 $args{'service'} ? :
147 0 1 unless ref $r eq 'ARRAY' and defined $r->[0] and defined $r->[0]{'status'}{'icingaapplication'}{'app'}
166 1 2 if @unknown_attrs
221 1 1 unless $expand and @$names
238 22 4 if (defined $getargs and ref $getargs)
244 0 26 unless my $r = $self->do_request($method, $url, $getargs, $postdata)
256 2 22 unless &all(sub { defined $args->{$_}; } , @_)
266 1 11 unless &any(sub { defined $args->{$_}; } , grep({exists $args->{$_};} @_))
276 1 11 unless defined $args->{'host'}
280 8 3 unless $args->{'service'}
288 18 3 unless ref $arg