Branch Coverage

lib/Net/IPTrie.pm
Criterion Covered Total %
branch 49 68 72.0


line true false branch
58 0 2 unless defined $argv{'version'}
61 1 1 if ($argv{'version'} == 4) { }
1 0 elsif ($argv{'version'} == 6) { }
93 0 12 unless ref $self
95 0 12 if defined $v
114 0 585 unless ref $self
115 0 585 if defined $s
144 0 12 unless ref $self
147 0 12 unless defined $address or defined $iaddress
150 3 9 unless defined $prefix
155 3 9 if (defined $address and not defined $iaddress)
163 369 102 ($iaddress & 2 ** $bit) == 0 ? :
165 164 307 unless (defined $p->$r)
166 163 1 if ($deep) { }
171 0 1 if ($p->iaddress) { }
182 17 453 if (defined $p->iaddress) { }
1 817 elsif (not $deep and $bit == $self->size - $prefix) { }
184 1 16 if ($p->iaddress == $iaddress and $p->prefix == $prefix)
215 0 9 unless ref $self
218 0 9 unless defined $address or defined $iaddress
221 2 7 unless defined $prefix
224 8 1 if (defined $address and not defined $iaddress) { }
1 0 elsif (defined $iaddress and not defined $address) { }
232 9 0 unless (defined $n->iaddress and $n->iaddress == $iaddress)
261 0 1 unless ref $self
267 1 0 if ($mode eq 'depth_first') { }
296 7 4 if ($self->version == 4) { }
301 0 11 unless $nip
318 1 0 if ($self->version == 4) { }
323 0 1 unless $nip
343 5 31 if ($n->address)
344 5 0 if (defined $code and ref $code eq 'CODE')
350 29 7 if defined $n->left
351 6 30 if defined $n->right