Branch Coverage

blib/lib/POE/Component/Client/opentick/Protocol.pm
Criterion Covered Total %
branch 35 68 51.4


line true false branch
58 0 1 if @args & 1
109 1 6 if exists $valid_args{lc $_}
111 0 7 if $valid_args{lc $_}
125 0 4 if (OTCancel($cmd_id) and not $self->_request_exists($fields[0]))
142 0 4 if OTCancel($cmd_id)
178 0 3 if (length $data < $msg_len + 4) { }
203 0 3 unless $self->_validate_header($msg_type, $cmd_sts, $cmd_id, $req_id)
211 0 3 if ($cmd_sts == OTConstant('OT_STATUS_ERROR')) { }
296 4 0 if $packet
325 1 2 if (@$objects and my $object = $$objects[0])
414 0 1 unless $cmd_id
420 0 1 if (is_error($object)) { }
0 1 elsif ($object->is_eod) { }
432 0 1 if $event eq OTEvent('OT_ON_DATA')
438 1 0 if $event eq OTEvent('OT_ON_LOGIN')
448 0 1 $$self{'rawdata'} ? :
538 0 3 unless OTCmdStatus($cmd_sts)
539 0 3 unless OTMsgType($msg_type)
540 0 3 unless OTCommand($cmd_id)
541 0 3 unless $self->_get_request_command($req_id)
564 0 3 defined $data ? :
566 0 3 defined $data ? :
583 3 0 unless OTCancel($cmd_id)
604 3 1 unless ($cmd_id == OTConstant('OT_HEARTBEAT'))
623 1 0 if ($packets_expected <= OTConstant('OT_RESPONSES_ONE') or is_error($object)) { }
665 3 0 if (defined $new_count) { }
702 0 1 unless $req_id
706 1 0 $pruned ? :
719 0 0 if (time > $self->_get_request_time($req_id) + $timeout and $cmd_id == OTConstant('OT_REQUEST_LIST_EXCHANGES') || $cmd_id == OTConstant('OT_REQUEST_LIST_SYMBOLS') || $cmd_id == OTConstant('OT_REQUEST_LIST_SYMBOLS_EX'))
746 0 0 exists $$self{'requests'}{$req_id} ? :
778 4 0 exists $$self{'requests'}{$req_id} ? :
789 1 0 exists $$self{'requests'}{$req_id} ? :
803 0 4 if ++$id > 4294967295
804 0 4 unless $id