Branch Coverage

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


line true false branch
17 1 31 if @_ % 2
23 29 1 if (defined $ua)
27 0 29 unless defined $self->{'ua'}
43 1 4 if ($args{'service'} and not $args{'services'})
49 2 2 if $args{'services'}
71 1 2 if defined $args{'name'}
76 1 1 if defined $args{'service'}
85 2 1 if (ref $args) { }
109 1 2 defined $args{'host'} ? :
128 2 1 $args{'service'} ? :
148 0 1 unless ref $r eq 'ARRAY' and defined $r->[0] and defined $r->[0]{'status'}{'icingaapplication'}{'app'}
167 1 2 if @unknown_attrs
222 1 1 unless $expand and @$names
239 22 4 if (defined $getargs and ref $getargs)
245 0 26 unless my $r = $self->do_request($method, $url, $getargs, $postdata)
257 2 22 unless &all(sub { defined $args->{$_}; } , @_)
267 1 11 unless &any(sub { defined $args->{$_}; } , grep({exists $args->{$_};} @_))
277 1 11 unless defined $args->{'host'}
281 8 3 unless $args->{'service'}
289 18 3 unless ref $arg