Branch Coverage

lib/Net/IP/RangeCompare.pm
Criterion Covered Total %
branch 117 144 81.2


line true false branch
142 1 227 unless looks_like_number $start
143 1 226 unless looks_like_number $end
144 3 223 if $start > $end
151 1 87 if ($#args > 0) { }
154 1 86 unless defined $args[0]
157 47 39 if (ref $string)
158 46 1 if $class and $class eq 'Net::IP::RangeCompare'
159 0 1 if ($class) { }
161 0 0 unless $string =~ m[ ^ \d(\.\d{1,3}){0,3} \s*[/-]\s* \d(\.\d{1,3}){0,3} $ ]x
174 1 39 unless looks_like_number $end
197 1 1 if ref $$s[5]
226 9 36 if $range_a->cmp_first_int($range_b) != 1 and $range_a->cmp_last_int($range_b) != -1
232 0 36 if cmp_int($range_a->first_int, $range_b->last_int) != 1 and cmp_int($range_a->last_int, $range_b->last_int) != -1
239 2 34 if $range_b->cmp_first_int($range_a) != 1 and $range_b->cmp_last_int($range_a) != -1
247 4 30 if cmp_int($range_b->first_int, $range_a->last_int) != 1 and cmp_int($range_b->last_int, $range_a->last_int) != -1
272 585 432 if $s->mod_first_int($size)
276 400 32 if cmp_int($last_int, $s->last_int) == 1
284 16 16 if ($first_cidr->cmp_last_int($s) == 0) { }
302 1 0 defined $next ? :
309 1 0 defined $next ? :
316 1 2 if cmp_int($int, $s->last_int) == 1
328 3 12 if ($mode eq 'first_int') { }
3 9 elsif ($mode eq 'first_ip') { }
3 6 elsif ($mode eq 'last_ip') { }
3 3 elsif ($mode eq 'last_int') { }
1 2 elsif ($mode eq 'netmask_int') { }
2 0 elsif ($mode eq 'netmask') { }
356 1 2 unless $cidr
362 3 6 unless $n
366 3 3 if (cmp_int($cidr_end, $n->last_int) != -1) { }
386 1 1 unless $inc
389 2 6 if $done
393 4 2 if (cmp_int($s->last_int, $next) != -1) { }
399 2 4 if $s->cmp_last_int($new_range) == 0
420 0 30 if $_[0] eq 'Net::IP::RangeCompare'
421 0 30 if $_[0] eq \%Net::IP::RangeCompare::HELPER
423 0 30 if $#$ranges == -1
425 1 29 if cmp_values($range->first_int, $range->last_int) == 1
433 0 1 unless defined $cmp
436 3 0 defined $range ? :
444 0 2 unless defined $cmp
447 4 0 defined $range ? :
453 4 1 if $_[0] eq 'Net::IP::RangeCompare'
454 4 1 if $_[0] eq \%Net::IP::RangeCompare::HELPER
459 10 12 if $_[0] eq 'Net::IP::RangeCompare'
460 10 12 if $_[0] eq \%Net::IP::RangeCompare::HELPER
465 0 2 if $_[0] eq 'Net::IP::RangeCompare'
466 0 2 if $_[0] eq \%Net::IP::RangeCompare::HELPER
471 0 1 if $_[0] eq 'Net::IP::RangeCompare'
472 0 1 if $_[0] eq \%Net::IP::RangeCompare::HELPER
477 0 6 if $_[0] eq 'Net::IP::RangeCompare'
478 0 6 if $_[0] eq \%Net::IP::RangeCompare::HELPER
482 6 24 unless @row
493 1 6 unless @row
495 1 5 if ($next) { }
499 4 1 if (@row) { }
510 33 17 if $_[0] eq 'Net::IP::RangeCompare'
511 33 17 if $_[0] eq \%Net::IP::RangeCompare::HELPER
513 4 46 unless defined $cols
556 0 7 unless defined $key
557 0 7 unless defined $range
560 0 7 unless $obj
564 4 3 if (exists $$s[0]{$key}) { }
577 0 2 unless defined $key
579 1 1 if exists $$s[0]{$key}
588 0 2 unless keys %{$$s[0];}
594 1 5 if exists $exclude{$key}
596 3 2 if $$s[3]{$key}
602 0 2 if $#$columns == -1
615 0 14 unless keys %{$$s[0];}
618 1 13 unless $$s[2]
622 2 12 unless @cols