Branch Coverage

blib/lib/Event/RPC/Connection.pm
Criterion Covered Total %
branch 57 100 57.0


line true false branch
58 18 0 if ($sock)
71 18 0 if $connection_hook
80 0 18 if $self->get_write_watcher
97 18 0 if $connection_hook
107 0 0 unless $self->get_client_objects->{$oid}
116 251 5 if (@_ == 2) { }
135 142 0 unless ($message)
143 0 142 if $request eq '' and $error eq ''
147 18 124 if $request eq "DISCONNECT\n" or $error =~ /DISCONNECTED/
154 121 3 unless $error
158 3 121 if ($error) { }
13 108 elsif ($cmd eq 'neg_formats_avail') { }
13 95 elsif ($cmd eq 'neg_format_set') { }
16 79 elsif ($cmd eq 'version') { }
2 77 elsif ($cmd eq 'auth') { }
0 77 elsif ($server->get_auth_required and not $self->get_is_authenticated) { }
8 69 elsif ($cmd eq 'new') { }
50 19 elsif ($cmd eq 'exec') { }
0 19 elsif ($cmd eq 'classes_list') { }
0 19 elsif ($cmd eq 'class_info') { }
15 4 elsif ($cmd eq 'class_info_all') { }
4 0 elsif ($cmd eq 'client_destroy') { }
230 124 0 if ($message->write)
231 124 0 if $self->get_write_watcher
249 13 0 if ($client_format eq $format)
256 0 13 if $@
276 0 2 unless $auth_module
282 1 1 if ($ok) { }
311 0 8 if (not defined $self->get_classes->{$class}{$class_method} or $self->get_classes->{$class}{$class_method} ne '_constructor')
324 0 8 if $self->get_server->get_load_modules
333 0 8 if ($@)
364 0 0 if (not $load_class_info or $self->get_server->get_auto_reload_modules and ($mtime = (stat $load_class_info->{'filename'})[9]) > $load_class_info->{'mtime'})
369 0 0 unless ($load_class_info->{'filename'})
376 0 0 if -f "$dir/$rel_filename"
380 0 0 unless $filename
390 0 0 if $mtime > $load_class_info->{'mtime'}
394 0 0 if ($@) { }
422 0 50 unless (defined $object_entry)
432 0 50 unless (defined $self->get_classes->{$class} and defined $self->get_classes->{$class}{$method})
448 0 50 if $self->get_server->get_load_modules
458 0 50 if ($@)
471 11 39 if ($return_type eq '_object')
477 9 3 if (ref $rc and not ref($rc) =~ /ARRAY|HASH|SCALAR/) { }
1 2 elsif (ref $rc eq 'ARRAY') { }
1 1 elsif (ref $rc eq 'HASH') { }
493 10 0 if (ref $val and not ref($val) =~ /ARRAY|HASH|SCALAR/)
509 10 0 if (ref $val and not ref($val) =~ /ARRAY|HASH|SCALAR/)
560 0 0 unless (defined $self->get_classes->{$class})
592 0 33 if (defined $self->get_classes->{ref $par})
596 0 0 unless defined $self->get_objects->{$key}