Branch Coverage

blib/lib/NOLookup/RDAP/RDAPLookup.pm
Criterion Covered Total %
branch 30 206 14.5


line true false branch
174 0 4 unless $args->{'service_url'}
176 0 4 if ($args->{'norid_referral_ip'} and $args->{'norid_referral_ip'} =~ /^\d+$/)
180 0 0 if $ip
212 0 4 unless ($self->_validate_and_analyze($query, $check, $nameservers, $entity))
245 0 4 if ($self->{'norid_header_secret'})
250 0 4 if ($self->{'norid_header_proxy'})
257 0 4 if ($self->{'norid_referral_ip'})
259 0 0 if ($URL =~ /\?/)
268 0 4 if ($self->{'debug'})
270 0 0 if $self->{'norid_header_proxy'}
271 0 0 if $self->{'norid_header_secret'}
272 0 0 if $self->{'norid_referral_ip'}
277 2 2 if ($http_type eq "head")
281 0 2 unless ($resp->is_success)
291 0 2 unless ($resp)
297 0 2 if ($resp->isa("NOLookup::RDAP::RDAPLookup"))
305 0 0 if (ref $err eq 'ARRAY') { }
308 0 0 if ($el eq 'errorCode') { }
0 0 elsif ($el eq 'title') { }
326 0 2 if ($resp->isa("Net::RDAP::Error"))
336 0 6 unless ($rdapConformance_vals_supported{$cfe})
374 0 0 if ($rdap_error =~ /^4\d+$/) { }
0 0 elsif ($rdap_error =~ /^5\d+$/) { }
376 0 0 if ($rdap_error == 404) { }
0 0 elsif ($rdap_error == 429) { }
386 0 0 if ($rdap_error == 501) { }
430 0 0 if ($if_info->{$key} eq "127.0.0.1")
439 0 0 if $lo_found
463 0 4 if (my $ip = $self->{'norid_referral_ip'})
464 0 0 unless (is_ip($ip))
473 4 0 if $q
475 0 4 unless ($q)
481 0 4 if ($q =~ /^\d{9}$/) { }
0 4 elsif ($q =~ /^N\.(PRI|LEG|ORG|REG)\.\d+$/i) { }
0 4 elsif ($q =~ /REG(\d+)-NORID$/i) { }
0 4 elsif ($q =~ /.+([PORH])-NORID$/i) { }
4 0 elsif ($q =~ /.+\..+$|^\.(no.*)$/i) { }
483 0 0 if ($q eq '000000000') { }
0 0 elsif (not $q =~ /^[8|9]\d{8}/) { }
495 0 0 if ($entity)
506 0 0 if ($entity)
526 0 0 if ($ot eq 'P' or $ot eq 'O') { }
0 0 elsif ($ot eq 'H') { }
531 0 0 if ($entity)
541 0 0 if ($entity)
560 0 4 if ($1)
567 0 4 if ($ns)
578 0 4 unless ($arg)
584 0 4 unless ($arg)
590 2 2 if ($check) { }
591 0 2 unless ($rdap_head_get_method_args{$arg})
600 0 0 unless ($rdap_head_get_method_args{$arg} or $rdap_get_method_args{$arg})
608 2 0 if ($rdap_head_get_method_args{$arg}) { }
638 0 0 if ($response->isa('Net::RDAP::Error')) { }
0 0 elsif ($response->isa('Net::RDAP::SearchResult')) { }
645 0 0 if $rst
646 0 0 if $errs and @$errs
653 0 0 if $rst
654 0 0 if $errs and @$errs
675 0 0 if ("entity" ne $response->class)
679 0 0 if ($xname ne $name) { }
688 0 0 if ('ip network' eq $response->class) { }
0 0 elsif ('autnum' eq $response->class) { }
0 0 elsif ('domain' eq $response->class) { }
0 0 elsif ('entity' eq $response->class) { }
0 0 elsif ('nameserver' eq $response->class) { }
693 0 0 if $response->start > 0 and $response->end > 0
694 0 0 if $response->type
698 0 0 if (scalar @ns > 0)
707 0 0 if (scalar @ds > 0)
717 0 0 if (scalar @keys > 0)
732 0 0 if (scalar @addrs > 0) { }
743 0 0 if (scalar @events)
755 0 0 if (scalar @status > 0)
759 0 0 if ($epp) { }
773 0 0 if (not $ent->vcard and $expand)
786 0 0 if ($new->isa('Net::RDAP::Error')) { }
797 0 0 if (scalar @entities > 0)
803 0 0 if (scalar @roles > 0) { }
804 0 0 if ($entity->handle) { }
818 0 0 if (not $card) { }
828 0 0 unless ($short)
830 0 0 if (scalar @links > 0)
839 0 0 if (scalar @remarks > 0)
844 0 0 if $remark->title
857 0 0 if (scalar @notices > 0)
862 0 0 if $notice->title
889 0 0 if $card->full_name
890 0 0 if $card->organization
893 0 0 if (scalar @addresses > 0)
899 0 0 'ARRAY' eq ref $element ? :
907 0 0 if ($email->{'type'}) { }
917 0 0 'ARRAY' eq ref $number->{'type'} ? :
918 0 0 &any(sub {
938 0 0 unless $name
940 0 0 if ('Net::DNS::Domain' eq ref $name) { }
960 0 0 if ($handle =~ /REG\d+-NORID$/) { }
0 0 elsif ($handle =~ /.+([O|P|R|H|D])-NORID$/) { }
964 0 0 if $1 eq "O"
965 0 0 if $1 eq "R"
966 0 0 if $1 eq "P"
967 0 0 if $1 eq "H"
968 0 0 if $1 eq "D"