Condition Coverage

blib/lib/Net/CIDR/Lite.pm
Criterion Covered Total %
condition 49 70 70.0


and 3 conditions

line !l l&&!r l&&r condition
42 0 6 21 defined $mask and $mask =~ /\A(?:0|[1-9][0-9]*)\z/
6 1 20 defined $mask and $mask =~ /\A(?:0|[1-9][0-9]*)\z/ and $mask <= $self->{'NBITS'} - 8
79 4 1 142 not vec($start, $sbit ^ 7, 1) and $sbit > 0
186 7 6 259 /\A[0-9]{1,3}\z/ and not /\A0[0-9]{1,2}\z/
13 0 259 /\A[0-9]{1,3}\z/ and not /\A0[0-9]{1,2}\z/ and $_ <= 255
198 18 14 0 $ip =~ /\A:/ and not $ip =~ s/\A::/:/
199 32 0 0 $ip =~ /:\z/ and not $ip =~ s/::\z/:/
210 14 9 0 $ipv4 and @nums > 6
325 1 1 2 $ip ge $find->[$start] and $ip lt $find->[$end]
372 0 1 2 @_ and not $self->{'PACK'}
403 2 1 3 @ips and $ips[0] lt $ip
427 0 0 1 $ip ge $find->[$start] and $ip lt $find->[$end]

or 2 conditions

line l !l condition
38 20 6 0 $self->_init($ip) or confess("Can't determine ip format")
175 20 4 $masks{$nbits} ||= [map({pack "B*", substr(1 x $_ . 0 x $nbits, 0, $nbits);} 0 .. $nbits)]
238 2 3 0 $self->_init($ip) or confess("Can't determine ip format")
252 2 0 0 $self->_init($ip_start) or confess("Can't determine ip format")
342 0 5 shift() || 20
446 3 1 shift() || ''
447 3 1 $self->{'PREPPED'}{$ip} || []
449 0 4 $self->{'CACHE'}{$key} ||= {map({$_, 1;} @$aref)}
454 1 3 shift() || 4
466 2 8 $cache{$key_str} ||= \@keys
478 0 0 $self->{'PACK'}->(shift()) || (return)

or 3 conditions

line l !l&&r !l&&!r condition
16 0 34 0 ref $proto || $proto
211 12 7 4 $empty or @nums == ($ipv4 ? 6 : 8)
364 0 2 0 ref $proto || $proto