| line | % | coverage | condition |
| 45 | 100 | | defined $_[0] && exists $KNOWN_OPTION{$_[0]} |
| 100 | | @_ and not ref $_[0] and not defined $_[0] && exists $KNOWN_OPTION{$_[0]} |
| 50 | 100 | | @_ == 1 and ref $_[0] eq "HASH" |
| 64 | 100 | | defined $target and length $target |
| 69 | 100 | | defined $opt{'ctor'} and ref $opt{'ctor'} ne "ARRAY" |
| 73 | 100 | | defined $opt{'host'} || defined $opt{'port'} |
| 81 | 100 | | $transport eq "unix" and defined $opt{'token'} || defined $opt{'token_file'} |
| 86 | 100 | | $transport eq "unix" and grep {length $opt{$_} if defined $opt{$_};} "tls_cert", "tls_key", "tls_ca", "tls_fingerprint" |
| 91 | 100 | | defined $opt{'token'} and defined $opt{'token_file'} |
| 99 | 100 | | defined $opt{'host'} and defined $opt{'port'} |
| 104 | 100 | | not $opt{'port'} =~ /\A[0-9]+\z/ or $opt{'port'} < 1 or $opt{'port'} > 65535 |
| 116 | 100 | | defined $opt{$_} && length $opt{$_} |
| 121 | 71 | | A | B | C | D | dec |
|---|
| 0 | X | 0 | X | 0 | | 0 | X | 1 | 0 | 0 | | 0 | X | 1 | 1 | 1 | | 1 | 0 | 0 | X | 0 | | 1 | 0 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | X | X | 1 |
| defined $opt{'tls_ca'} and length $opt{'tls_ca'} or defined $opt{'tls_fingerprint'} and length $opt{'tls_fingerprint'} |
| 126 | 100 | | defined $opt{'tls_fingerprint'} and length $opt{'tls_fingerprint'} |
| 75 | | defined $opt{'tls_ca'} and length $opt{'tls_ca'} and (defined $opt{'tls_fingerprint'} and length $opt{'tls_fingerprint'}) |
| 132 | 67 | | defined $opt{'socket'} && length $opt{'socket'} |
| 153 | 67 | | defined $opt{'log'} && length $opt{'log'} |
| 100 | | defined $opt{'tls_fingerprint'} && length $opt{'tls_fingerprint'} |
| 100 | | $opt{'ctor'} || [] |
| 194 | 100 | | defined $method and length $method |
| 251 | 100 | | -e $self->{'socket_path'} and time < $deadline |
| 300 | 100 | | $response and $response->{'ok'} |
| 301 | 100 | | ref $response->{'result'} eq "ARRAY" and $response->{'result'}[0] |
| 305 | 100 | | @_ and ref $_[0] and &Scalar::Util::refaddr($_[0]) == &Scalar::Util::refaddr($self) |
| 322 | 100 | | $class eq "Class::Shared::Frontend" or $class eq "UNIVERSAL" |
| 333 | 100 | | $response and $response->{'ok'} |
| 335 | 100 | | ref $response->{'result'} eq 'ARRAY' && $response->{'result'}[0] |
| 372 | 100 | | defined $error and length $error |
| 395 | 100 | | $self->{'last_error'} || 'no backend' |
| 399 | 100 | | $self->{'autostart'} and $self->{'transport'} eq "unix" |
| 404 | 100 | | $self->{'last_error'} || 'timed out' |
| 441 | 100 | | defined $why and length $why |
| 469 | 67 | | socket $sock, 1, 1, 0 and connect $sock, pack_sockaddr_un($path) |
| 500 | 100 | | $response->{'error'} || 'the backend refused the handshake' |
| 520 | 75 | | $self->{'transport'} eq "tcp" and defined $error and $error =~ /closed by peer|read failed|write failed/ |
| 546 | 100 | | $response->{'error'} || 'the backend gave no reason' |
| 560 | 100 | | $message->{'op'} || '' |
| 568 | 100 | | defined $error and length $error |
| 594 | 50 | | $message->{'op'} || '' |
| 596 | 67 | | ref $refusal eq "HASH" and not $refusal->{'ok'} |
| 673 | 67 | | $state ne "running" and not $self->_fork_backend($lock) |
| 699 | 67 | | $state ne "running" and not $self->_fork_backend($lock) |
| 709 | 100 | | not $sock and ($state // "") eq "running" |
| 50 | | $self->{'last_error'} // "no reason was given" |
| 50 | | $state // "" |
| 765 | 100 | | -e $path and not unlink($path) |
| 100 | | -e $path and not -S $path |
| 788 | 67 | | defined $error and $error =~ /\AClass::Shared: / |
| 812 | 33 | | not defined $pid or $pid > 0 |
| 823 | 67 | | defined $_ and not ref $_ |
| 843 | 0 | | $ENV{'PATH'} // "" |