Branch Coverage

blib/lib/RPC/Switch/Client.pm
Criterion Covered Total %
branch 1 192 0.5


line true false branch
12 1 0 unless $ENV{'MOJO_REACTOR'}
76 0 0 $debug ? :
84 0 0 unless $self->{'token'} = $args{'token'}
85 0 0 unless $self->{'who'} = $args{'who'}
88 0 0 unless $self->{'autoconnect'}
92 0 0 if $self->{'auth'}
112 0 0 if ($self->{'log'}) { }
118 0 0 $self->{'debug'} ? :
123 0 0 unless my $rpc = "JSON::RPC2::TwoWay"->new("debug", $debug, "json", $self->{'jsonobject'})
140 0 0 if $self->{'tls_ca'}
141 0 0 if $self->{'tls_cert'}
142 0 0 if $self->{'tls_key'}
147 0 0 if ($err)
164 0 0 if @err
165 0 0 if $err[0]
171 0 0 unless $conn
211 0 0 unless $i->{'version'} eq "1.0"
221 0 0 if $e
222 0 0 unless $r
224 0 0 if ($r) { }
243 0 0 unless ($status and $status eq "RES_WAIT")
263 0 0 unless my $method = $args{'method'}
272 0 0 if ($self->{'json'}) { }
275 0 0 unless ref $inargs eq "HASH"
277 0 0 unless ref $inargs eq "HASH"
280 0 0 if ($reqauth)
284 0 0 if ($reqauth)
285 0 0 if (&blessed($reqauth))
286 0 0 if ($reqauth->can('_to_reqauth')) { }
293 0 0 unless ref $reqauth eq "HASH"
300 0 0 if ($timeout > 0)
302 0 0 unless my $rescb = delete $req->{'rescb'}
308 0 0 $vtag ? :
312 0 0 $reqauth ? :
320 0 0 if ($e)
323 0 0 if $rescb
327 0 0 unless $rescb
329 0 0 if ($status eq 'RES_WAIT') { }
331 0 0 unless ($vci)
341 0 0 if $waitcb
344 0 0 if $self->{'json'} and ref $outargs
346 0 0 if $tmr
353 0 0 if $rescb
354 0 0 if $tmr
365 0 0 unless $ns
367 0 0 $notify ? :
372 0 0 if $self->{'json'}
381 0 0 unless $status and $status eq "RES_WAIT"
382 0 0 unless $notify
400 0 0 unless $id
402 0 0 unless $vci
404 0 0 unless $req
406 0 0 unless $rescb
407 0 0 if $tmr
409 0 0 if $self->{'json'} and ref $outargs
418 0 0 unless $ch
420 0 0 unless $wl
423 0 0 if $tmr
424 0 0 if $rescb
441 0 0 if (not $e and $r and $r =~ /pong/u) { }
464 0 0 if ($self->lastping // 0) > time - $pt
470 0 0 if $pt > 0
476 0 0 if $prepare
479 0 0 unless $self->ioloop->is_running
481 0 0 if $tmr
494 0 0 unless my $method = $args{'method'}
495 0 0 unless my $cb = $args{'cb'}
497 0 0 $args{'async'} ? :
498 0 0 unless $mode =~ /^(subproc|async|async2|sync)$/u
502 0 0 if $self->actions->{$method}
513 0 0 $args{'filter'} ? :
0 0 $args{'doc'} ? :
521 0 0 if ($e)
527 0 0 unless ($res)
570 0 0 unless ($action)
575 0 0 unless my $rpcswitch = $request->{'rpcswitch'}
587 0 0 if $action->{'meta'}
591 0 0 if ($action->{'mode'} eq 'async2') { }
0 0 elsif ($action->{'mode'} eq 'async') { }
0 0 elsif ($action->{'mode'} eq 'sync') { }
0 0 elsif ($action->{'mode'} eq 'subproc') { }
604 0 0 if ($@)
620 0 0 if ($@) { }
627 0 0 if ($@) { }
645 0 0 if ($@) { }
663 0 0 unless pipe my $reader, my $writer
665 0 0 unless defined(my $pid = fork)
666 0 0 unless ($pid)
672 0 0 if ($@) { }
694 0 0 unless $$ == $me
697 0 0 if ($@)
704 0 0 if $@
719 0 0 if state $looping++
724 0 0 if (ref $reactor eq 'Mojo::Reactor::EV') { }
0 0 elsif (ref $reactor eq 'Mojo::Reactor::Poll') { }
744 0 0 if $err