Condition Coverage

blib/lib/Net/BitTorrent.pm
Criterion Covered Total %
condition 81 171 47.3


and 3 conditions

line !l l&&!r l&&r condition
85 5 0 41 $self->_socket_open_tcp($host, $port) and $self->_socket_open_udp($host, $port)
112 0 68 1444 $_udp{refaddr $s} && $_use_dht{refaddr $s}
155 0 6 0 $value != _MSE_DISABLED() and $value != _MSE_ENABLED()
6 0 0 $value != _MSE_DISABLED() and $value != _MSE_ENABLED() and $value != _MSE_FORCED()
169 0 1 0 defined $value and $value =~ /^\d+$/
0 1 0 defined $value and $value =~ /^\d+$/ and $value
179 0 1 0 defined $value and $value =~ /^\d+$/
189 0 0 0 defined $value && $value =~ /^\d+$/
199 0 0 0 defined $value && $value =~ /^\d+$/
209 0 0 6 defined $value && $value =~ /^\d+$/
219 0 15 0 defined $value and $value =~ /^[10]$/
235 0 2 1381 defined $timeout && $timeout =~ /^(\-1|\d+)\.?\d*$/
250 571 0 812 $nfound and $nfound != -1
283 0 2294 0 $mode and $mode =~ /^(?:ro|rw|wo)$/
324 5 49 1 defined $port and not $port =~ /^\d+$/
334 0 51 3 $host and not $host =~ /^(?:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.]?){4})$/
364 41 0 6 defined $_tcp{refaddr $self} and fileno $_tcp{refaddr $self}
41 0 6 defined $_tcp{refaddr $self} and fileno $_tcp{refaddr $self} and defined $_connections{refaddr $self}{fileno $_tcp{refaddr $self}}
388 5 44 1 defined $port and not $port =~ /^\d+$/
400 0 46 3 $host and not $host =~ /^(?:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.]?){4})$/
429 41 0 6 $_udp{refaddr $self} and fileno $_udp{refaddr $self}
41 0 6 $_udp{refaddr $self} and fileno $_udp{refaddr $self} and defined $_connections{refaddr $self}{fileno $_udp{refaddr $self}}
441 0 0 812 $rin and ref $rin
0 0 812 $rin and ref $rin and ref $rin eq 'SCALAR'
0 0 812 $win and ref $win
0 0 812 $win and ref $win and ref $win eq 'SCALAR'
0 812 0 $rin and ref $rin and ref $rin eq 'SCALAR' and ($win and ref $win and ref $win eq 'SCALAR')
0 0 812 $ein and ref $ein
0 0 812 $ein and ref $ein and ref $ein eq 'SCALAR'
0 812 0 $rin and ref $rin and ref $rin eq 'SCALAR' and ($win and ref $win and ref $win eq 'SCALAR') and ($ein and ref $ein and ref $ein eq 'SCALAR')
452 0 5534 812 $_tcp{refaddr $self} and $fileno == fileno $_tcp{refaddr $self}
0 4722 812 $_udp{refaddr $self} and $fileno == fileno $_udp{refaddr $self}
496 0 0 0 $tracker and $tracker->_on_data($paddr, $data)
507 0 66 57 $_use_dht{refaddr $self} and $_dht{refaddr $self}->_on_data($paddr, $data)
536 4722 0 0 vec($$ein, $fileno, 1) && ($^E && $^E != _EINPROGRESS() && $^E != _EWOULDBLOCK())
583 1 1 0 blessed $torrent and $torrent->isa('Net::BitTorrent::Torrent')
643 1 2966 0 $$args{'Object'} and blessed($$args{'Object'})
648 0 2966 0 $$args{'Time'} and $$args{'Time'} =~ /^\d+(?:\.\d+)?$/

or 2 conditions

line l !l condition
330 50 4 $host ||= '0.0.0.0'
331 8 46 $port ||= 0
394 45 4 $host ||= '0.0.0.0'
397 3 46 $port ||= 0
698 2966 0 $_tid{refaddr $self} ||= "\000\000\000\000"
700 0 47 $len or ''

or 3 conditions

line l !l&&r !l&&!r condition
155 0 0 6 not defined $value or $value != _MSE_DISABLED() and $value != _MSE_ENABLED() and $value != _MSE_FORCED()
189 0 0 0 not defined $value && $value =~ /^\d+$/ or $value < 1
199 0 0 0 not defined $value && $value =~ /^\d+$/ or $value < 1
209 0 0 6 not defined $value && $value =~ /^\d+$/ or $value < 1
282 105 0 2294 not $_sock or ref $_sock ne 'GLOB'
312 0 0 0 blessed $self || !$self->isa('Net::BitTorrent')
55 0 0 $self or not blessed $self || !$self->isa('Net::BitTorrent')
319 9 0 46 $_tcp{refaddr $self} or $host
376 0 0 0 blessed $self || !$self->isa('Net::BitTorrent')
50 0 0 $self or not blessed $self || !$self->isa('Net::BitTorrent')
383 50 0 0 $_tcp{refaddr $self} or $host
540 328 4341 53 $read or $write
4669 0 53 $read or $write or $error
638 1 0 2967 not $args or ref $args ne 'HASH'
653 0 0 2966 not $$args{'Code'} or ref $$args{'Code'} ne 'CODE'