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
86 0 5 unless can_open_socket()
89 1 4 unless defined $alias and length $alias
92 3 2 unless defined $timeout and $timeout >= 0
103 5 0 unless defined $payload
105 0 5 if scalar keys %params
156 0 10 if $@ or not $socket
171 0 14 unless socket $socket, 2, 3, $protocol
182 5 4 if ($heap->{'rcvbuf'})
183 0 5 unless (setsockopt $heap->{'socket_handle'}, 1, 8, pack('I', $heap->{'rcvbuf'}))
193 3 6 if ($heap->{'parallelism'} and $heap->{'parallelism'} == -1)
195 3 0 if ($rcvbuf)
198 3 0 if ($max_parallel > 8) { }
0 0 elsif ($max_parallel < 1) { }
234 9 46 unless (scalar keys %{$$heap{'ping_by_seq'};})
235 4 5 unless (defined $heap->{'socket_handle'})
242 7 48 unless defined $timeout and $timeout > 0
243 0 55 unless defined $tries_left
248 55 0 unless exists $heap->{'ping_by_seq'}{$master_seq}
269 0 55 if length($msg) % 2
287 1 54 if (ref $event eq 'ARRAY') { }
299 55 0 if ($heap->{'always_decode'} or length $address != 4)
306 0 55 unless (defined $usable_address)
338 4 51 if ($tries_left and $tries_left > 1)
354 47 55 unless scalar @{$heap->{'queue'};}
356 0 55 if ($heap->{'parallelism'} and $heap->{'outstanding'} >= $heap->{'parallelism'})
369 0 55 unless exists $heap->{'pending'}{$seq}
383 1 54 if ref $event eq 'ARRAY'
386 0 55 unless (send $heap->{'socket_handle'}, $msg, 0, $socket_address)
428 4 51 if (exists $heap->{'addr_to_seq'}{$sender}{$address})
449 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
452 0 0 if (defined $address) { }
470 0 47 unless exists $heap->{'socket_handle'}
472 42 5 if scalar keys %{$$heap{'ping_by_seq'};}
477 1 4 if $heap->{'keep_socket'}
494 0 51 unless $ping_info
505 11 40 unless scalar keys %{$$heap{'addr_to_seq'}{$pbs_session};}
517 0 4 unless exists $heap->{'addr_to_seq'}{$sender}
521 0 4 unless ($seq)
529 4 0 unless scalar keys %{$$heap{'addr_to_seq'}{$sender};}
546 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
576 0 29 unless $from_saddr
580 0 29 unless defined $heap->{'message_length'}
606 14 15 unless $from_type == 0
611 0 15 unless $from_pid == ($$ & 65535)
616 4 11 unless exists $heap->{'ping_by_seq'}{$from_seq}
628 2 9 if ($heap->{'onereply'})
646 5 49 unless (exists $heap->{'ping_by_seq'}{$seq})
656 4 45 if ($retryinfo)