Branch Coverage

blib/lib/Metabrik/Client/Whois.pm
Criterion Covered Total %
branch 0 106 0.0


line true false branch
44 0 0 unless $self->brik_help_run_undef_arg("parse_raw_ip_whois", $lines)
46 0 0 unless my $sp = "Metabrik::String::Parse"->new_from_brik_init($self)
47 0 0 unless my $chunks = $sp->split_by_blank_line($lines)
58 0 0 if (/abuse/i and /\@/)
60 0 0 if (defined $new)
61 0 0 defined $new ? :
66 0 0 if (/^\s*%error 230 No objects found/i) { }
0 0 elsif (/^\s*%error 350 Invalid Query Syntax/i) { }
0 0 elsif (/^\s*%error 501 Service Not Available: exceeded max client sessions/i) { }
0 0 elsif (/^\s*%ok\s*$/) { }
79 0 0 if /^\s*%/
80 0 0 if /^\s*#/
83 0 0 if (/^\s*([^:]+?)\s*:\s*(.*)\s*$/) { }
0 0 elsif (/^\s*([^\(]+)\(([^\)]+)\)\s*(\S+\s*-\s*\S+)$/) { }
0 0 elsif (/^\s*No match found for /i) { }
84 0 0 if (defined $1 and defined $2)
88 0 0 if (exists $new->{$k}) { }
114 0 0 if (@abuse > 0)
118 0 0 if (keys %$new > 0 and not exists $new->{'match'})
122 0 0 if (keys %$new > 0)
141 0 0 unless $self->brik_help_run_undef_arg("normalize_raw_ip_whois", $chunks)
142 0 0 unless $self->brik_help_run_undef_arg("normalize_raw_ip_whois", $lines)
148 0 0 if (@$chunks <= 0)
155 0 0 if (exists $_->{'inetnum'} or exists $_->{'netrange'} or exists $_->{'network'} or exists $_->{'ip_network'})
160 0 0 unless (defined $general)
229 0 0 if (exists $_->{'origin'} and exists $_->{'route'})
272 0 0 if $_ eq "raw"
273 0 0 if (my @toks = split(/\n/, $r->{$_}, 0))
286 0 0 unless $self->brik_help_run_undef_arg("ip", $ip)
288 0 0 unless my $na = "Metabrik::Network::Address"->new_from_brik_init($self)
289 0 0 unless ($na->is_ip($ip))
293 0 0 unless my $nw = "Metabrik::Network::Whois"->new_from_brik_init($self)
294 0 0 unless my $lines = $nw->target($ip)
297 0 0 if ($self->use_normalization)
298 0 0 unless my $chunks = $self->parse_raw_ip_whois($lines)
299 0 0 unless $r = $self->normalize_raw_ip_whois($chunks, $lines)
313 0 0 if (exists $this->{$key})
316 0 0 exists $result->{$normalize} ? :
326 0 0 unless $self->brik_help_run_undef_arg("domain", $domain)
328 0 0 unless my $na = "Metabrik::Network::Address"->new_from_brik_init($self)
329 0 0 if ($na->is_ip($domain))
333 0 0 unless my $nw = "Metabrik::Network::Whois"->new_from_brik_init($self)
334 0 0 unless my $lines = $nw->target($domain)
340 0 0 if ($self->use_normalization)
418 0 0 if $_ eq "raw"
419 0 0 if (my @toks = split(/\n/, $r->{$_}, 0))
426 0 0 if (keys %$r > 1) { }
441 0 0 unless $self->brik_help_run_undef_arg("is_available_domain", $domain)
443 0 0 unless my $info = $self->domain($domain)
452 0 0 unless $self->brik_help_run_undef_arg("is_ip_from_owner", $ip)
453 0 0 unless $self->brik_help_run_undef_arg("is_ip_from_owner", $owner)
455 0 0 unless my $r = $self->ip($ip)
456 0 0 if (exists $r->{'description'} and $r->{'description'} =~ /$owner/i or exists $r->{'organization'} and $r->{'organization'} =~ /$owner/i)