Branch Coverage

blib/lib/POE/Component/Client/Ping.pm
Criterion Covered Total %
branch 65 98 66.3


line true false branch
83 0 5 if @_ % 2
87 0 5 unless defined $socket or can_open_socket()
92 1 4 unless defined $alias and length $alias
95 3 2 unless defined $timeout and $timeout >= 0
105 5 0 unless defined $payload
107 0 5 if scalar keys %params
158 0 9 if $@ or not $socket
173 0 13 unless socket $socket, 2, 3, $protocol
184 5 4 if ($heap->{'rcvbuf'})
185 0 5 unless (setsockopt $heap->{'socket_handle'}, 1, 8, pack('I', $heap->{'rcvbuf'}))
195 3 6 if ($heap->{'parallelism'} and $heap->{'parallelism'} == -1)
197 3 0 if ($rcvbuf)
200 3 0 if ($max_parallel > 8) { }
0 0 elsif ($max_parallel < 1) { }
236 9 46 unless (scalar keys %{$$heap{'ping_by_seq'};})
237 4 5 unless (defined $heap->{'socket_handle'})
244 7 48 unless defined $timeout and $timeout > 0
245 0 55 unless defined $tries_left
250 55 0 unless exists $heap->{'ping_by_seq'}{$master_seq}
271 0 55 if length($msg) % 2
289 1 54 if (ref $event eq 'ARRAY') { }
301 55 0 if ($heap->{'always_decode'} or length $address != 4)
308 0 55 unless (defined $usable_address)
340 4 51 if ($tries_left and $tries_left > 1)
356 47 55 unless scalar @{$heap->{'queue'};}
358 0 55 if ($heap->{'parallelism'} and $heap->{'outstanding'} >= $heap->{'parallelism'})
371 0 55 unless exists $heap->{'pending'}{$seq}
385 1 54 if ref $event eq 'ARRAY'
388 0 55 unless (send $heap->{'socket_handle'}, $msg, 0, $socket_address)
430 4 51 if (exists $heap->{'addr_to_seq'}{$sender}{$address})
451 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
454 0 0 if (defined $address) { }
472 0 47 unless exists $heap->{'socket_handle'}
474 42 5 if scalar keys %{$$heap{'ping_by_seq'};}
479 1 4 if $heap->{'keep_socket'}
496 0 51 unless $ping_info
507 11 40 unless scalar keys %{$$heap{'addr_to_seq'}{$pbs_session};}
519 0 4 unless exists $heap->{'addr_to_seq'}{$sender}
523 0 4 unless ($seq)
531 4 0 unless scalar keys %{$$heap{'addr_to_seq'}{$sender};}
548 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
578 0 29 unless $from_saddr
582 0 29 unless defined $heap->{'message_length'}
608 14 15 unless $from_type == 0
613 0 15 unless $from_pid == ($$ & 65535)
618 4 11 unless exists $heap->{'ping_by_seq'}{$from_seq}
630 2 9 if ($heap->{'onereply'})
648 5 49 unless (exists $heap->{'ping_by_seq'}{$seq})
658 4 45 if ($retryinfo)