Branch Coverage

blib/lib/JSON/RPC/Legacy/Server.pm
Criterion Covered Total %
branch 2 150 1.3


line true false branch
21 2 0 if ($] >= 5.006)
35 0 0 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
0 2 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
0 0 if defined $_[1]
70 0 0 if (@arg == 0) { }
0 0 elsif (@arg > 1) { }
79 0 0 if (ref $arg[0] eq 'ARRAY') { }
0 0 elsif (ref $arg[0] eq 'HASH') { }
0 0 elsif (ref $arg[0]) { }
106 0 0 if ($self->request->method eq 'POST') { }
0 0 elsif ($self->request->method eq 'GET') { }
113 0 0 if ($jsondata) { }
115 0 0 if ($@)
120 0 0 unless ($self->error_response_header)
125 0 0 if ($obj)
127 0 0 unless ($self->error_response_header)
150 0 0 if (exists $opt{'version'} and $opt{'version'} ne '1.1') { }
176 0 0 $$obj{'version'} ? :
180 0 0 if (not defined $method) { }
0 0 elsif ($method =~ /[^-._a-zA-Z0-9]/) { }
189 0 0 unless ($procedure)
195 0 0 unless ($$obj{'version'})
196 0 0 unless ($$obj{'params'} and ref $$obj{'params'} eq 'ARRAY')
201 0 0 unless ($params = $self->_argument_type_check($$procedure{'argument_type'}, $$obj{'params'}))
207 0 0 if ($$obj{'version'}) { }
208 0 0 ref $params ? :
214 0 0 if (ref $params eq 'ARRAY') { }
224 0 0 if ($self->error_response_header) { }
0 0 elsif ($@) { }
228 0 0 $self->return_die_message ? :
231 0 0 unless ($$obj{'version'} or defined $$obj{'id'})
237 0 0 if ($$obj{'version'}) { }
255 0 0 if ($method =~ /^system\.(\w+)$/) { }
0 0 elsif ($method =~ /\./) { }
265 0 0 if ($$self{'dispatch_path'}) { }
268 0 0 if (my $pkg = $$self{'dispatch_path'}{$path})
270 0 0 if $classname and $pkg ne $classname
271 0 0 if $JSONRPC_Procedure_Able and 'JSON::RPC::Legacy::Procedure'->can($method)
275 0 0 if ($system_call)
283 0 0 if $classname and $pkg ne $classname
284 0 0 if $JSONRPC_Procedure_Able and 'JSON::RPC::Legacy::Procedure'->can($method)
286 0 0 if ($system_call)
288 0 0 if (my $ret = $self->_method_is_ebable($pkg, $method, $system_call))
304 0 0 if ($allowable_procedure)
305 0 0 if (exists &$allowable_procedure()->{$method}) { }
313 0 0 if ($code or $code = $pkg->can($method))
314 0 0 if $system_call or not $JSONRPC_Procedure_Able
316 0 0 if (my $procedure = JSON::RPC::Legacy::Procedure::check($pkg, $code))
317 0 0 if $$procedure{'return_type'} and $$procedure{'return_type'} eq 'Private'
323 0 0 if ($system_call)
324 0 0 if (my $code = 'JSON::RPC::Legacy::Server::system'->can($method))
336 0 0 unless (defined $type)
337 0 0 defined $params ? :
342 0 0 if (ref $params eq 'ARRAY') { }
0 0 elsif (ref $params eq 'HASH') { }
0 0 elsif (not defined $params) { }
343 0 0 if (@{$$type{'position'};} != @$params)
348 0 0 if (my $hash = $$type{'names'})
357 0 0 if (@{$$type{'position'};} != keys %$params)
362 0 0 if (my $hash = $$type{'names'})
365 0 0 if ($name =~ /^\d+$/) { }
377 0 0 if (@{$$type{'position'};} != 0)
388 0 0 $regulated ? :
397 0 0 if ($@)
411 0 0 if ($self->can('translate_error_message'))
423 0 0 if ($self->version) { }
428 0 0 if defined $id
431 0 0 unless defined $id