Branch Coverage

blib/lib/Net/STOMP/Client/Connection.pm
Criterion Covered Total %
branch 16 78 20.5


line true false branch
45 13 3 if ($uri =~ m[ ^ (tcp|ssl|stomp|stomp\+ssl) \:\/\/ ([_a-z0-9\.\-]+) \: (\d+) \/? $ ]xi) { }
77 0 1 if ($string =~ /\b(backOffMultiplier=(\d+(\.\d+)?))\b/)
80 0 1 if ($string =~ /\b(useExponentialBackOff=false)\b/)
83 1 0 if ($string =~ /\b(randomize=false)\b/)
86 1 0 if ($string =~ /\b(initialReconnectDelay=(\d+))\b/)
89 0 1 if ($string =~ /\b(maxReconnectDelay=(\d+))\b/)
92 1 0 if ($string =~ /\b(maxReconnectAttempts=(\d+))\b/)
111 0 12 if ($uri =~ /^file:(.+)$/) { }
3 9 elsif ($uri =~ m[ ^ failover \: (?:\/\/)? \( ([_a-z0-9\.\-\:\/\,]+) \) ( \? [_a-z0-9\.\=\-\&]+ ) ? $ ]xi) { }
1 8 elsif ($uri =~ m[ ^ failover \: ([_a-z0-9\.\-\:\/\,]+) $ ]xi) { }
117 0 0 if length $line
119 0 0 if (@list == 1) { }
131 1 2 if $2
145 0 9 unless @peers
162 0 0 if ($peer->proto =~ /\b(ssl)\b/) { }
164 0 0 unless ($IO::Socket::SSL::VERSION)
166 0 0 if $@
169 0 0 unless $socket
175 0 0 unless $socket
178 0 0 unless binmode $socket
194 0 0 unless @{$peers;}
197 0 0 $peeropt->{'randomize'} ? :
200 0 0 if (ref $result) { }
201 0 0 if $debug =~ /\b(connection|all)\b/
205 0 0 if $debug =~ /\b(connection|all)\b/
209 0 0 if (defined $peeropt->{'max_attempt'})
210 0 0 if $count >= $peeropt->{'max_attempt'}
212 0 0 if ($peeropt->{'sleep'})
214 0 0 if ($peeropt->{'multiplier'})
216 0 0 if ($peeropt->{'max_sleep'} and $peeropt->{'sleep'} > $peeropt->{'max_sleep'})
224 0 0 if (defined $peeropt->{'max_attempt'})
225 0 0 if $count >= $peeropt->{'max_attempt'}
227 0 0 unless keys %{$peeropt;}
270 0 0 if (defined $option{'uri'}) { }
273 0 0 if defined $option{'host'}
275 0 0 if defined $option{'port'}
279 0 0 unless defined $option{'host'}
280 0 0 unless defined $option{'port'}
282 0 0 if grep /^SSL_/, keys %{$option{'sockopt'};}