Branch Coverage

blib/lib/Net/Whois/Generic.pm
Criterion Covered Total %
branch 57 86 66.2


line true false branch
146 3 4 if (ref($_[0]) =~ /HASH/i) { }
153 7 49 exists $options{$_} ? :
171 6 19 if defined $hostname
185 0 11 if defined $port and $port =~ /^\d+$/
199 0 86 if defined $timeout and $timeout =~ /^\d+$/
222 0 24 if (scalar @_ == 1)
224 0 0 $value ? :
301 0 11 unless defined $socket
305 5 6 if (my $ios = $self->ios) { }
306 5 0 unless $ios->exists($socket)
345 0 0 unless $self->is_connected
346 0 0 if ($self->ios->can_write(30 + $self->timeout))
363 1 0 if $self->is_connected
378 7 2 if ($self->is_connected)
382 7 0 if $self->{'__state'}{'ioselect'}
398 10 3 UNIVERSAL::isa($socket, 'IO::Socket') && $socket->connected ? :
427 2 6 if ($query =~ /^(41|102|105|154|196|197)\.\d+\.\d+\.\d+/ or $query =~ /AFRINIC/i or $query =~ /^2c00::/i) { }
0 6 elsif ($query =~ /^(23|34|50|64|64|65|66|67|68|69|70|71|72|73|74|75|76|96|97|98|9|100|104|107|108|135|136|142|147|162|166|172|173|174|184|192|198|199|204|205|206|207|208|209|216)/ or $query =~ /^(2001:0400|2001:1800|2001:4800:|2600|2610:0000):/i or $query =~ /ARIN/) { }
2 4 elsif ($query =~ /^(10|14|27|36|39|42|49|58|59|60|61|101|103|106|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|169\.208|175|180|182|183|202|203|210|211|218|219|220|221|222|223)\.\d+\.\d+/ or $query =~ /^(2001:0200|2001:0C00|2001:0E00|2001:4400|2001:8000|2001:A000|2001:B000|2400:0000|2001:0DC0|2001:0DE8|2001:0DF0|2001:07FA|2001:0DE0|2001:0DB8):/i or $query =~ /APNIC/) { }
471 8 0 unless $rir
473 6 2 unless ($self->hostname)
474 4 2 if ($rir eq 'ripe') { }
1 1 elsif ($rir eq 'afrinic') { }
0 1 elsif ($rir eq 'arin') { }
0 1 elsif ($rir eq 'lacnic') { }
1 0 elsif ($rir eq 'apnic') { }
493 2 6 if $self->unfiltered
494 8 0 unless $self->recursive
495 0 8 if $self->referral
534 2 4 if ($opt =~ /^attribute$/i) { }
4 0 elsif ($opt =~ /^type$/i) { }
542 3 5 unless (ref $self)
555 0 8 if ($response)
560 4 4 if ($type)
564 2 6 if ($attribute) { }
568 2 0 ref $r eq 'ARRAY' ? :
7 2 $@ ? :
586 9 0 if ($self->ios->can_write(30 + $self->timeout))
592 66 0 if ($self->ios->can_read(30 + $self->timeout))
594 58 8 if defined $block
623 1 1 unless $value =~ /^%\s/
642 0 0 if $@
644 0 0 if ($response->response =~ /ERROR.*:.*?(\d+)/)