Branch Coverage

blib/lib/RPC/Serialized.pm
Criterion Covered Total %
branch 35 48 72.9


line true false branch
32 0 17 if exists $params->me->{'ifh'} and not _is_valid_input_handle($params->me->{'ifh'})
36 0 17 if exists $params->me->{'ofh'} and not _is_valid_output_handle($params->me->{'ofh'})
40 17 0 if exists $params->me->{'ofh'}
48 34 0 if defined $h and ref $h and $h->can('error')
57 17 0 if _is_valid_handle($h) and $h->can('getline') and $h->can('eof')
66 17 0 if _is_valid_handle($h) and $h->can('print') and $h->can('autoflush') and $h->can('error')
78 4 42 unless ref $data eq 'HASH'
83 2 40 if ($self->debug) { }
85 0 2 $send_data =~ /\n$/ ? :
0 2 unless $io->print($send_data . ($send_data =~ /\n$/ ? '' : "\n") . "$TERMINATOR\n") and not $io->error
91 0 40 unless $io->print($self->ds->serialize($data) . "\n") and not $io->error
102 4 47 if ($self->debug) { }
104 2 8 if /^\Q$TERMINATOR\E$/o
112 0 51 if $io->error
115 46 5 if defined $data
116 5 46 unless defined $data and length $data
120 4 42 if ($self->debug) { }
125 40 2 if defined $token
130 3 43 if $@
133 1 42 if not defined $data or $data == 1
136 0 42 if ref $data ne 'HASH'
140 19 23 wantarray ? :
146 17 0 if $self->ifh
147 17 0 if $self->ofh