Branch Coverage

blib/lib/MMM/Host.pm
Criterion Covered Total %
branch 7 38 18.4


line true false branch
35 1 12 unless $infos{'hostname'}
38 5 7 if ($infos{'geolocation'})
97 0 0 unless ($_[0]{'get_geo_done'})
98 0 0 unless (defined $_[0]{'latitude'} and defined $_[0]{'longitude'})
101 0 0 unless $_[0]->get_dnsloc
117 0 0 unless my($name, $aliases, $addrtype, $length, $paddr, @addrs) = gethostbyname $self->hostname
123 0 0 unless my $info = $hostip->get_info($addr)
124 0 0 if defined $info->latitude
126 0 0 if defined $info->longitude
128 0 0 if defined $info->country_name
130 0 0 if defined $info->city
148 0 0 unless my $answer = $dnsq->query(join('.', @partname), 'LOC')
150 0 0 if ($ans->type eq 'LOC')
180 0 3 if grep {not defined $_;} $self->geo, $host->geo
200 0 0 if ($self->hostname eq $host->hostname)
215 5 0 if (not defined $$self{$_} or defined $$host{$_} and $host->revision > $self->revision)
225 0 1 if ($host->revision > $self->revision)
243 0 0 if ($$self{$_})
248 0 0 if (defined $$self{'latitude'} and defined $$self{'longitude'})