Branch Coverage

blib/lib/Net/WhoisNG.pm
Criterion Covered Total %
branch 47 212 22.1


line true false branch
66 2 0 if ($$self{'domain'})
69 0 2 unless my $ip = gethostbyname $server
71 0 2 unless my $sock = 'IO::Socket::INET'->new('PeerAddr', $ip, 'PeerPort', 'whois', 'Proto', 'tcp')
73 2 0 if ($sock) { }
83 0 2 if ($domain =~ /com$|.net$/)
85 0 0 if ($rslts[$n] =~ /Whois Server:\s+(\S+)\s+/)
88 0 0 unless $ip = gethostbyname $server
90 0 0 unless $sock = 'IO::Socket::INET'->new('PeerAddr', $ip, 'PeerPort', 'whois', 'Proto', 'tcp', 'Timeout', '5')
111 0 2 if ($tld =~ /com/i) { }
145 0 138 if ($$self{'domain'} =~ /.com$|.net$|.tv$/) { }
0 138 elsif ($$self{'domain'} =~ /.edu/) { }
138 0 elsif ($$self{'domain'} =~ /.org$|.info$|.us$/i) { }
0 0 elsif ($$self{'domain'} =~ /.biz$/) { }
146 0 0 if ($line =~ /No Match/i)
150 0 0 if ($line =~ /Registrar:\s+((\S+)\s+)+/g) { }
0 0 elsif ($line =~ /Registrant:\s+((\S+)\s+)+/g) { }
157 0 0 if ($line =~ /Registrar\s+Name:\s+((\S+)\s+)+/g)
162 0 0 if ($line =~ /created on\s+(\S+)./ or $line =~ /Created on\S*:\s+(\S+)\s+$/i or $line =~ /Created on\S+:\s+((\S+\s+)+)/)
167 0 0 if ($line =~ /Expires on\s+(\S+)./gi or $line =~ /expires on\S*:\s+(\S+)\s+$/i or $line =~ /expires on\S+:\s+((\S+\s+)+)/gi)
172 0 0 if ($line =~ /updated on\s+(\S+)\./i or $line =~ /updated on\S*:\s+(\S+)\s+$/i or $line =~ /updated on\S+:\s+((\S+\s+)+)/i)
176 0 0 if ($capadmin or $captech or $capregistrant) { }
0 0 elsif ($capns) { }
178 0 0 if ($line =~ /(\s+)\S+/) { }
0 0 elsif ($line =~ /^\s+$/) { }
185 0 0 if ($toffset > $offset) { }
191 0 0 if ($capadmin)
198 0 0 if ($captech)
212 0 0 if ($line =~ /(\S+)/)
215 0 0 if ($rslts[$#rslts] =~ /$1/)
225 0 0 if ($cappin and $line =~ /^\s+$/)
235 0 0 if ($line =~ /Domain\s+servers/i or $line =~ /name\s+servers/i)
239 0 0 if ($line =~ /(\s*)Administrative\s+Contact:/ or $line =~ /(\s*)Administrative\s+Contact(\S+\s+)(\S+)/)
241 0 0 if (defined $3)
242 0 0 if ($3 =~ /techn/i)
250 0 0 if ($line =~ /(\s*)Technical\s+Cont/i)
252 0 0 if ($self->getPerson('tech'))
262 0 0 if ($line =~ /^No Match/)
266 0 0 if ($line =~ /activated:\s+(\S+)\s+$/i)
271 0 0 if ($line =~ /updated:\s+(\S+)\s+$/i)
275 0 0 if ($capadmin or $captech or $capregistrant) { }
0 0 elsif ($capns) { }
278 0 0 if ($line =~ /^\s+$/) { }
280 0 0 if (not @tcap) { }
295 0 0 if ($capadmin)
297 0 0 if (@tcap < 1)
305 0 0 if ($captech)
306 0 0 if (@tcap < 1)
321 0 0 if ($line =~ /(\S+)/)
324 0 0 if ($rslts[$#rslts] =~ /$1/)
334 0 0 if ($cappin and $line =~ /^\s+$/)
344 0 0 if ($line =~ /name\s+servers:/i)
348 0 0 if ($line =~ /(\s*)Administrative\s+Contact:/)
353 0 0 if ($line =~ /(\s*)Technical\s+Cont/i)
362 0 138 if ($line =~ /NOT\s+FOUND/)
367 78 60 if ($line =~ /^(Bill|^Admin|^Tech|^Registrant)/) { }
16 44 elsif ($line =~ /name\s+server:(\S+\s+)/i) { }
0 44 elsif ($line =~ /expiration\s+date:(.*)/i) { }
0 44 elsif ($line =~ /last\s+updated\s+\S+:(.*)/i) { }
379 60 18 if ($2)
383 60 18 if ($3)
391 75 3 if ($self->getPerson($key)) { }
398 0 78 if ($prop =~ /ID:/i) { }
6 72 elsif ($prop =~ /name/i) { }
6 66 elsif ($prop =~ /organization/i) { }
0 66 elsif ($prop =~ /street1/i) { }
0 66 elsif ($prop =~ /street2/i) { }
6 60 elsif ($prop =~ /city/i) { }
6 54 elsif ($prop =~ /code/i) { }
6 48 elsif ($prop =~ /country/i) { }
6 42 elsif ($prop =~ /phone/i) { }
6 36 elsif ($prop =~ /email/i) { }
452 0 0 if ($line =~ /NOT\s+FOUND/i)
455 0 0 if ($line =~ /^Bill/ or $line =~ /^Admin/ or $line =~ /^Tech/ or $line =~ /^Registrant/) { }
0 0 elsif ($line =~ /name\s+server:\s+(\S+\s+)/i) { }
0 0 elsif ($line =~ /expiration\s+date:\s+((\S+\s+)+){1,6}/i) { }
0 0 elsif ($line =~ /last\s+updated\s+date:\s+((\S+\s+)+){1,6}/i) { }
467 0 0 if ($self->getPerson($key)) { }
474 0 0 if ($prop =~ /ID:/) { }
0 0 elsif ($prop =~ /name/i) { }
0 0 elsif ($prop =~ /organization/i) { }
0 0 elsif ($prop =~ /address1/i) { }
0 0 elsif ($prop =~ /address2/i) { }
0 0 elsif ($prop =~ /city/i) { }
0 0 elsif ($line =~ /postal\s+code/i) { }
0 0 elsif ($prop =~ /country/i) { }
0 0 elsif ($line =~ /phone\s+number/i) { }
0 0 elsif ($prop =~ /email/i) { }
540 0 0 if ($raw_date =~ /(\d{1,2})-(\w\w\w)-(\d\d\d\d)/) { }
0 0 elsif ($raw_date =~ /(\d\d\d\d)-(\w\w\w)-(\d\d$)/) { }
0 0 elsif ($raw_date =~ /(\d\d\d\d)-(\w\w\w)-(\d\d).$/) { }
0 0 elsif ($raw_date =~ /\w\w\w,\s+(\S+)\s+(\d{1,2}),\s+(\d\d\d\d)/) { }
0 0 elsif ($raw_date =~ /(\d{1,2})-(\w\w\w)-(\d\d)/) { }
0 0 elsif ($raw_date =~ /((\S+\s+)+){1,6}/) { }
0 0 elsif ($raw_date =~ /\w\w\w\s+(\w\w\w)\s+(\d{1,2})\S+\s+\w\w\w\s+(\d{4})/) { }
618 0 1 if (defined $$self{'status'})
623 1 0 unless defined $exp
626 0 0 if (length $emonth == 1)
634 0 0 if (length $cmonth == 1)
638 0 0 if (length $cday == 1)
643 0 0 if ($status >= 0)
657 155 1 if (defined $t_people)
670 2 1 if ($$self{'people'})
689 14 2 if (defined $$self{'nameservers'})
712 0 0 unless my $xml = 'XML::Simple'->new('suppressempty', '', 'XMLDecl', 1, 'NoAttr', 1)
724 0 0 if (defined $hash) { }
747 0 0 if defined $$self{'createddate'}