line |
true |
false |
branch |
34
|
28 |
0 |
unless $self->bufsize |
35
|
0 |
28 |
unless defined $self->connect_delay |
36
|
27 |
1 |
unless defined $self->reconnect_on_fork |
37
|
27 |
1 |
unless defined $self->reconnect_attempts |
38
|
26 |
2 |
unless defined $self->initial_reconnect_attempts |
39
|
28 |
0 |
unless defined $self->socket_options |
41
|
0 |
28 |
unless $self->logger |
55
|
6 |
22 |
if ($self->failover) { } |
|
19 |
3 |
elsif ($self->hosts) { } |
58
|
1 |
5 |
unless $uris |
62
|
1 |
6 |
unless $host =~ m[^\w+://([a-zA-Z0-9\-./]+):([0-9]+)$] |
72
|
23 |
3 |
if @hosts |
86
|
5 |
24 |
if ($self->_should_stop_trying($initial, $tries)) |
98
|
11 |
18 |
$initial ? : |
102
|
12 |
17 |
unless $max_tries > 0 |
104
|
14 |
3 |
if (defined $self->hosts) |
113
|
48 |
4 |
if (my $hosts = $self->hosts) |
114
|
13 |
35 |
if (defined $self->current_host and $self->current_host < $#{$hosts;}) { } |
126
|
29 |
23 |
unless $socket |
141
|
0 |
0 |
unless defined $timeout |
152
|
0 |
0 |
if ($self->ssl) { } |
154
|
0 |
0 |
if $@ |
157
|
0 |
0 |
unless $self->ssl_options |
163
|
0 |
0 |
if $socket |
165
|
0 |
0 |
if ($keep_alive) |
167
|
0 |
0 |
if ('Socket'->can('SO_KEEPALIVE')) { } |
186
|
11 |
0 |
if ($frame and $frame->command eq 'CONNECTED') |
198
|
0 |
14 |
unless $self->socket |
233
|
0 |
0 |
if ($self->{'_framebuf_changed'} and length $self->{'_framebuf'}) |
239
|
0 |
0 |
exists $conf->{'timeout'} ? : |
261
|
4 |
5 |
exists $conf->{'timeout'} ? : |
265
|
4 |
5 |
defined $receipt_timeout ? : |
271
|
4 |
5 |
if (@_ > 2) |
275
|
2 |
7 |
if ($receipt_frame and $receipt_frame->command eq 'RECEIPT' and $receipt_frame->headers->{'receipt-id'} eq $receipt_id) { } |
301
|
0 |
4 |
if (@_ > 2) |
305
|
1 |
3 |
if ($ret) { } |
328
|
2 |
11 |
if ($conf->{'id'}) |
377
|
5 |
43 |
unless ($self->_connected) |
379
|
0 |
4 |
unless ($self->_connected) |
390
|
1 |
57 |
unless defined $written |
393
|
1 |
46 |
unless (defined $written) |
396
|
2 |
45 |
unless (defined $written and $self->_connected) |
406
|
32 |
106 |
unless $self->select->can_read($timeout) |
411
|
103 |
3 |
if (defined $len and $len > 0) { } |
415
|
2 |
1 |
unless (defined $len) |
432
|
10 |
133 |
if $self->{'_headers'} |
433
|
31 |
102 |
if ($self->{'_framebuf'} =~ s/^\n*([^\n].*?)\n\n//s) |
436
|
31 |
0 |
if ($raw_headers =~ s/^(.+)\n//) |
442
|
36 |
0 |
unless defined $self->{'_headers'}{$key} |
453
|
37 |
30 |
if ($h->{'content-length'}) { } |
|
26 |
4 |
elsif ($self->{'_framebuf'} =~ s/^(.*?)\000\n*//s) { } |
454
|
5 |
32 |
if (length $self->{'_framebuf'} > $h->{'content-length'}) |
493
|
1 |
163 |
if $self->{'_pid'} != $$ and $self->reconnect_on_fork |
506
|
5 |
61 |
exists $conf->{'timeout'} ? : |
508
|
3 |
63 |
unless ($self->_connected) |
514
|
25 |
77 |
unless $self->_read_data($timeout) |
517
|
10 |
26 |
unless $self->_read_data($timeout) |