Condition Coverage

blib/lib/Net/DRI/Util.pm
Criterion Covered Total %
condition 91 179 50.8


and 3 conditions

line !l l&&!r l&&r condition
102 25 514 0 defined $_ and ref $_ || length $_
138 0 0 0 defined $$in{$_} && ref $$in{$_}
143 0 0 0 defined $_ && ref $_
174 0 0 0 xml_is_token($in, 3, 89) && $in =~ /^\w{1,80}-[0-9A-Za-z]{1,8}$/
192 0 1 16 $what and is_class($what, $isa)
205 0 0 0 defined $cs && is_class($cs, 'Net::DRI::Data::ContactSet') && !$cs->is_empty
212 0 9 0 defined $c && is_class($c, $class)
219 3 0 0 defined $h && is_class($h, 'Net::DRI::Data::Hosts') && ($emptyok || !$h->is_empty)
225 0 0 0 defined $h && is_class($h, 'Net::DRI::Data::Hosts')
231 0 0 3 defined $c && is_class($c, 'Net::DRI::Data::Changes') && !$c->is_empty
237 0 0 0 defined $s && is_class($s, 'Net::DRI::Data::StatusList') && !$s->is_empty
243 0 0 184 defined $key and $key
244 0 0 184 defined $rh and ref $rh eq 'HASH'
0 109 75 defined $rh and ref $rh eq 'HASH' and exists $$rh{$key}
109 0 75 defined $rh and ref $rh eq 'HASH' and exists $$rh{$key} and defined $$rh{$key}
251 0 0 0 has_key($rh, 'contact') && isa_contactset($$rh{'contact'})
257 1 0 0 has_key($rh, 'ns') && isa_hosts($$rh{'ns'})
263 0 0 1 has_key($rh, 'duration') && check_isa($$rh{'duration'}, 'DateTime::Duration')
269 0 0 0 has_key($rh, 'auth') && ref $$rh{'auth'} eq 'HASH'
275 0 0 0 has_key($rh, 'status') && isa_statuslist($$rh{'status'})
320 0 4 287 defined $d and $d ne ''
323 0 90 194 not $unicode and $d =~ /[^A-Za-z0-9\-]/
337 0 1 132 $s >= 0 and $s <= 255
340 1 0 32 defined $checkpublic and $checkpublic
346 28 0 1 $ip[0] == 169 and $ip[1] == 254
347 26 0 2 $ip[0] == 172 and $ip[1] >= 16
26 1 1 $ip[0] == 172 and $ip[1] >= 16 and $ip[1] <= 31
348 21 5 1 $ip[0] == 192 and $ip[1] == 0
26 0 1 $ip[0] == 192 and $ip[1] == 0 and $ip[2] == 2
349 21 4 1 $ip[0] == 192 and $ip[1] == 168
350 24 0 1 $ip[0] >= 224 and $ip[0] < 240
362 0 0 12 @ip > 0 and @ip <= 8
369 0 0 1 defined $checkpublic and $checkpublic
424 3 5 1 defined $min and $l < $min
425 2 4 2 defined $max and $l > $max
440 2 5 1 defined $min and $l < $min
441 1 4 2 defined $max and $l > $max
448 0 0 0 defined $what and $what
452 3 1 1 defined $in && $in =~ /^\d+$/ && $in < 65536
453 3 1 1 defined $in && $in =~ /^\d+$/ && $in < 256
454 1 1 2 defined $in && $in =~ /^[0-9A-F]+$/i
458 1 1 11 defined $in and $in =~ /^-?\d+$/
471 22 2 3 defined $min and length $in < $min
472 21 2 1 defined $max and length $in > $max
528 0 0 0 @c == 1 and not ref $c[0]
0 0 0 @c == 1 and not ref $c[0] and $c[0] eq ''
534 0 0 0 @c == 1 && !ref($c[0])
626 12 0 3 $type eq 'host' and $key =~ /\./
686 58 0 177 defined $ok && $ok

or 2 conditions

line l !l condition
192 1 0 $what || 'parameter'
373 1 0 $ip1 || ''
374 0 1 $ip2 || ''
686 58 0 $@ // 'unknown error'

or 3 conditions

line l !l&&r !l&&!r condition
102 114 400 0 ref $_ || length $_
322 1 1 284 $d =~ /^-/ or $d =~ /-$/
363 0 0 12 $ip =~ /^:[^:]/ or $ip =~ /[^:]:$/
400 0 0 1 $d1{'months'} <=> $d2{'months'} || $d1{'days'} <=> $d2{'days'} || $d1{'minutes'} <=> $d2{'minutes'} || $d1{'seconds'} <=> $d2{'seconds'}
528 0 0 0 not @c or @c == 1 and not ref $c[0] and $c[0] eq ''
579 0 0 0 $_->localname || $_->nodeName
625 12 0 3 $type eq 'domain' or $type eq 'nsgroup'
686 58 0 177 not defined $ok && $ok or $@