Branch Coverage

blib/lib/Device/OUI.pm
Criterion Covered Total %
branch 82 106 77.3


line true false branch
31 2 87 if (@_)
33 72 17 if ($handle)
35 8 9 if (my $db = $self->cache_db)
38 7 1 if (tie %cache, 'AnyDBM_File', $db, $opts, 438)
48 47 30 @_ && !ref($_[0]) ? :
52 53 24 if (@_) { }
13 11 elsif (my $x = $$handle{$oui}) { }
55 1 185 unless (defined $hash{$x})
66 96 2 if @_
73 96 6 if (@_)
75 95 1 if (my $norm = normalize_oui($oui)) { }
84 1 100 unless ($$self{'oui'})
92 292 4861 if (ref $oui)
97 4140 721 if (@parts == 3)
103 719 2 if (@parts == 6)
116 8 3839 unless my(@int) = oui_to_integers($oui)
130 1 4 $self->organization eq 'PRIVATE' ? :
137 15 13 if ($x = $$self{'lookup'})
139 2 11 if ($x = $self->cache)
140 11 0 if ($x = $self->update_from_file)
141 0 0 if ($x = $self->update_from_web)
142 0 0 if ($self->mirror_file)
143 0 0 if ($x = $self->update_from_file)
156 1 12 unless ($cf)
158 1 11 unless ($fh)
163 11 35 if (substr($entry, 0, 8) eq $oui)
176 15 2 if (defined $HAVE_LWP_SIMPLE)
178 0 2 if ($@) { }
190 2 12 unless ($url)
192 1 11 unless ($file)
193 0 11 unless ($self->have_lwp_simple)
196 4 7 if ($res == LWP::Simple::RC_NOT_MODIFIED())
197 0 7 unless (LWP::Simple::is_success($res))
207 1 7 unless ($url)
215 0 3 unless ($url)
217 0 3 unless ($file)
219 3 0 if ($self->mirror_file($url, $file))
228 1 4 unless ($file)
229 0 5 unless ($file)
246 6 2 unless ($oui)
249 0 8 unless ($url_format)
251 8 0 if ($url_format =~ /%s/) { }
261 0 6 unless (ref $self)
262 0 6 unless ($self->have_lwp_simple)
265 0 6 unless ($url)
267 6 0 if (my $page = $self->get_url($url))
268 0 6 if ($page =~ /listing contains no match/)
270 0 6 if (@entries > 1)
281 0 52 unless ($_)
291 10 42 unless $data{'address'}
295 0 146 pop @_ ? :
320 5 20 $org eq 'PRIVATE' ? :
328 20 5 if (my $a = $$d{'address'}) { }