Condition Coverage

blib/lib/Net/DRI/Util.pm
Criterion Covered Total %
condition 90 179 50.2


and 3 conditions

line !l l&&!r l&&r condition
103 25 577 0 defined $_ and ref $_ || length $_
139 0 0 0 defined $in->{$_} && ref $in->{$_}
144 0 0 0 defined $_ && ref $_
175 0 0 0 xml_is_token($in, 3, 89) && $in =~ /^\w{1,80}-[0-9A-Za-z]{1,8}$/
193 0 1 16 $what and is_class($what, $isa)
206 0 0 0 defined $cs && is_class($cs, 'Net::DRI::Data::ContactSet') && !$cs->is_empty
213 0 9 0 defined $c && is_class($c, $class)
220 3 0 0 defined $h && is_class($h, 'Net::DRI::Data::Hosts') && ($emptyok || !$h->is_empty)
226 0 0 0 defined $h && is_class($h, 'Net::DRI::Data::Hosts')
232 0 0 3 defined $c && is_class($c, 'Net::DRI::Data::Changes') && !$c->is_empty
238 0 0 0 defined $s && is_class($s, 'Net::DRI::Data::StatusList') && !$s->is_empty
244 0 0 211 defined $key and $key
245 0 0 211 defined $rh and ref $rh eq 'HASH'
0 211 0 defined $rh and ref $rh eq 'HASH' and exists $rh->{$key}
123 0 88 defined $rh and ref $rh eq 'HASH' and exists $rh->{$key} and defined $rh->{$key}
252 0 0 0 has_key($rh, 'contact') && isa_contactset($rh->{'contact'})
258 1 0 0 has_key($rh, 'ns') && isa_hosts($rh->{'ns'})
264 0 0 1 has_key($rh, 'duration') && check_isa($rh->{'duration'}, 'DateTime::Duration')
270 0 0 0 has_key($rh, 'auth') && ref $rh->{'auth'} eq 'HASH'
276 0 0 0 has_key($rh, 'status') && isa_statuslist($rh->{'status'})
321 0 4 287 defined $d and $d ne ''
324 0 90 194 not $unicode and $d =~ /[^A-Za-z0-9\-]/
338 0 1 132 $s >= 0 and $s <= 255
341 1 0 32 defined $checkpublic and $checkpublic
347 28 0 1 $ip[0] == 169 and $ip[1] == 254
348 26 0 2 $ip[0] == 172 and $ip[1] >= 16
26 1 1 $ip[0] == 172 and $ip[1] >= 16 and $ip[1] <= 31
349 21 5 1 $ip[0] == 192 and $ip[1] == 0
26 0 1 $ip[0] == 192 and $ip[1] == 0 and $ip[2] == 2
350 21 4 1 $ip[0] == 192 and $ip[1] == 168
351 24 0 1 $ip[0] >= 224 and $ip[0] < 240
363 0 0 12 @ip > 0 and @ip <= 8
370 0 0 1 defined $checkpublic and $checkpublic
426 3 5 1 defined $min and $l < $min
427 2 4 2 defined $max and $l > $max
443 2 5 1 defined $min and $l < $min
444 1 4 2 defined $max and $l > $max
451 0 0 0 defined $what and $what
456 3 1 1 defined $in && $in =~ /^\d+$/ && $in < 65536
457 3 1 1 defined $in && $in =~ /^\d+$/ && $in < 256
458 1 1 2 defined $in && $in =~ /^[0-9A-F]+$/i
462 1 1 11 defined $in and $in =~ /^-?\d+$/
475 22 2 3 defined $min and length $in < $min
476 21 2 1 defined $max and length $in > $max
532 0 0 0 @c == 1 and not ref $c[0]
0 0 0 @c == 1 and not ref $c[0] and $c[0] eq ''
538 0 0 0 @c == 1 && !ref($c[0])
632 12 0 3 $type eq 'host' and $key =~ /\./
692 67 0 204 defined $ok && $ok

or 2 conditions

line l !l condition
193 1 0 $what || 'parameter'
374 1 0 $ip1 || ''
375 0 1 $ip2 || ''
692 67 0 $@ // 'unknown error'

or 3 conditions

line l !l&&r !l&&!r condition
103 132 445 0 ref $_ || length $_
323 1 1 284 $d =~ /^-/ or $d =~ /-$/
364 0 0 12 $ip =~ /^:[^:]/ or $ip =~ /[^:]:$/
405 0 0 1 $d1{'months'} <=> $d2{'months'} || $d1{'days'} <=> $d2{'days'} || $d1{'minutes'} <=> $d2{'minutes'} || $d1{'seconds'} <=> $d2{'seconds'}
532 0 0 0 not @c or @c == 1 and not ref $c[0] and $c[0] eq ''
583 0 0 0 $_->localname || $_->nodeName
631 12 0 3 $type eq 'domain' or $type eq 'nsgroup'
692 67 0 204 not defined $ok && $ok or $@