line |
true |
false |
branch |
90
|
2 |
13 |
if (defined $params{'heartbeat'}) { } |
91
|
1 |
1 |
unless (ref $params{'heartbeat'} eq 'ARRAY') |
96
|
1 |
0 |
if ($val =~ /\D/) |
107
|
0 |
13 |
if (defined $params{'command_headers'}) |
108
|
0 |
0 |
unless (ref $params{'command_headers'} eq 'HASH') |
131
|
5 |
4 |
unless ($self->{'lazy'}) |
169
|
11 |
3 |
if (@_) |
172
|
5 |
6 |
if (defined $on_error) { } |
201
|
32 |
6 |
if (@_) |
204
|
8 |
4 |
if (defined $seconds and !&looks_like_number($seconds) || $seconds < 0) |
220
|
4 |
6 |
if (@_) |
263
|
1 |
4 |
if (defined $self->{'connection_timeout'}) |
280
|
0 |
0 |
if (defined $self->{'on_connect'}) |
354
|
0 |
0 |
unless @{$self->{'_write_queue'};} |
379
|
0 |
0 |
if $handle->destroyed |
381
|
0 |
0 |
if (defined $cmd_name) { } |
383
|
0 |
0 |
if (defined $headers->{'content-length'}) { } |
385
|
0 |
0 |
if length $handle->{'rbuf'} < $content_length + 1 |
389
|
0 |
0 |
if $content_length < 0 |
403
|
0 |
0 |
unless $handle->{'rbuf'} =~ s/^(.+?)(?:${\(\undef);}){2}//s |
426
|
0 |
2 |
if (ref $args->[-1] eq 'CODE' and scalar @{$args;} % 2 > 0) |
429
|
0 |
0 |
if ($cmd_name eq 'SUBSCRIBE') { } |
440
|
0 |
6 |
if (defined $headers{$name}) |
444
|
1 |
1 |
if (exists $ACK_CMDS{$cmd_name}) |
452
|
0 |
2 |
defined $self->{'command_headers'}{$cmd_name} ? : |
464
|
2 |
0 |
unless (defined $cmd->{'on_receipt'}) |
471
|
0 |
0 |
if (defined $err) |
485
|
1 |
1 |
if ($cmd->{'name'} eq 'SUBSCRIBE' and not defined $cmd->{'on_message'}) { } |
|
1 |
0 |
elsif (exists $ACK_CMDS{$cmd->{'name'}} and not defined $cmd->{'message'}) { } |
496
|
0 |
0 |
unless ($self->{'_ready'}) |
497
|
0 |
0 |
if (defined $self->{'_handle'}) { } |
|
0 |
0 |
elsif ($self->{'lazy'}) { } |
498
|
0 |
0 |
if ($self->{'_connected'}) |
499
|
0 |
0 |
if ($self->{'_login_state'} == 1) |
509
|
0 |
0 |
if (defined $self->{'reconnect_interval'} and $self->{'reconnect_interval'} > 0) { } |
512
|
0 |
0 |
unless (defined $self->{'_reconnect_timer'}) |
545
|
0 |
0 |
if (exists $ACK_CMDS{$cmd->{'name'}}) |
546
|
0 |
0 |
unless ($self->_check_ack($cmd->{'message'})) |
555
|
0 |
0 |
if ($self->{'_version'} <= 1.1) { } |
557
|
0 |
0 |
if ($self->{'_version'} > 1) |
566
|
0 |
0 |
if (exists $NEED_RECEIPT{$cmd->{'name'}} or defined $cmd_headers->{'receipt'}) { } |
569
|
0 |
0 |
if ($cmd->{'name'} eq 'CONNECT') { } |
573
|
0 |
0 |
if (not defined $cmd_headers->{'receipt'} or $cmd_headers->{'receipt'} eq 'auto') |
587
|
0 |
0 |
unless (defined $body) |
590
|
0 |
0 |
unless (defined $cmd_headers->{'content-length'}) |
596
|
0 |
0 |
unless (defined $value) |
613
|
0 |
0 |
if ($cy > 0) |
621
|
0 |
0 |
if (defined $self->{'login'}) |
624
|
0 |
0 |
if (defined $self->{'passcode'}) |
627
|
0 |
0 |
if (defined $self->{'vhost'}) |
642
|
0 |
0 |
if (defined $err) |
653
|
0 |
0 |
if (defined $receipt_headers->{'heart-beat'}) |
656
|
0 |
0 |
if ($sx > 0) |
659
|
0 |
0 |
if ($sy > 0) |
719
|
0 |
0 |
if (defined $sub) |
720
|
0 |
0 |
if (defined $sub->{'pending_acks'}) |
721
|
0 |
0 |
if (ref $sub->{'pending_acks'} eq 'ARRAY') { } |
723
|
0 |
0 |
$msg_tag < $_ ? : |
|
0 |
0 |
$msg_tag > $_ ? : |
727
|
0 |
0 |
if ($i >= 0) |
733
|
0 |
0 |
if delete $sub->{'pending_acks'}{$msg_tag} |
745
|
0 |
0 |
if ($frame->command eq 'MESSAGE') { } |
|
0 |
0 |
elsif ($frame->command eq 'RECEIPT') { } |
|
0 |
0 |
elsif ($frame->command eq 'ERROR') { } |
752
|
0 |
0 |
if (defined $self->{'_pending_receipts'}{'CONNECTED'}) |
773
|
0 |
0 |
unless (defined $sub) |
786
|
0 |
0 |
if (defined $sub->{'pending_acks'}) |
787
|
0 |
0 |
if (ref $sub->{'pending_acks'} eq 'ARRAY') { } |
807
|
0 |
0 |
unless (defined $cmd) |
817
|
0 |
0 |
if (exists $SUBUNSUB_CMDS{$cmd->{'name'}}) { } |
|
0 |
0 |
elsif ($cmd->{'name'} eq 'DISCONNECT') { } |
821
|
0 |
0 |
if ($cmd->{'name'} eq 'SUBSCRIBE') { } |
824
|
0 |
0 |
if (defined $cmd_headers->{'ack'}) |
825
|
0 |
0 |
if ($cmd_headers->{'ack'} eq 'client') { } |
|
0 |
0 |
elsif ($cmd_headers->{'ack'} eq 'client-individual') { } |
854
|
0 |
0 |
if (defined $err_headers->{'receipt-id'}) |
858
|
0 |
0 |
if (defined $cmd) { } |
874
|
0 |
0 |
if (defined $self->{'_handle'}) |
880
|
0 |
0 |
if ($was_connected and defined $self->{'on_disconnect'}) |
915
|
0 |
0 |
if (not defined $err and @queued_commands) |
920
|
0 |
0 |
if (defined $err) |
927
|
0 |
0 |
if (%subs and $err_code != 4) |
986
|
5 |
10 |
if (defined $self->{'_handle'}) |
990
|
9 |
6 |
if (defined $self->{'_pending_receipts'}) |