Remote/Connector/UNIX.pm

filter: Statementstmt 50.0% 13 / 26 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 50.0% 3 / 6 Podpod n/a totaltotal 34.0% 16 / 47 CC 7 SCAR 26.9
CC
7
Cov
34%
__ANON__
30.0
_open2_for
6.0
_open2_for
6.0
CRAP 14.8
« Remote/Connector/INET.pm ↑ Summary Remote/Role/LogForwarder.pm »
1 package Object::Remote::Connector::UNIX;
2  
3 11 ▶use IO::Socket::UNIX;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 11 with 'Object::Remote::Role::Connector';
7  
8 11 has socket_path => (is => 'ro', required => 1);
9  
10 0 ▶sub _open2_for {
Subroutine _open2_for: not called CC=2 SCAR=17.9
11 0 ▶ my ($self) = @_;
Subroutine _open2_for: not called CC=2 SCAR=17.9
12 0 my $path = $self->socket_path;
13 0 ▶ my $sock = IO::Socket::UNIX->new($path)
Branch: 2 branches
BranchTrueFalseTotal
my $sock = "IO::Socket::UNIX"->new($path) or die "Couldn't open socket ${path}: $!" 0 0 0
my $sock = "IO::Socket::UNIX"->new($path) or die "Couldn't open socket ${path}: $!" 0 0 0
14 or die "Couldn't open socket ${path}: $!";
15 0 ($sock, $sock, undef);
16 }
17  
18 11 ▶no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶push @Object::Remote::Connection::Guess, sub {
Subroutine __ANON__: not called CC=5 SCAR=34.0
21 0 for ($_[0]) {
22 0 ▶ if (defined and !ref and /^(?:\.\/|\/)/) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_ and not ref $_ and m[^(?:\./|/)]) 0 0 0
Condition0%0/6
defined $_ and not ref $_ and m[^(?:\./|/)]
!ll&&!rl&&r
000
defined $_ and not ref $_
!ll&&!rl&&r
000
MC/DC0%0/3
defined $_ and not ref $_ and m[^(?:\./|/)]
defined $_ not ref $_ m[^(?:\./|/)]
Truth table0%0/4
A and not(B) and C
A= defined $_B= not ref $_C= m[^(?:\./|/)]
ABCresult
0XX0
10X0
1100
1111
23 0 my $socket = shift(@_);
24 0 return __PACKAGE__->new(@_, socket_path => $socket);
25 }
26 }
27 0 return;
28 11 };
29  
30 11 1;
« Remote/Connector/INET.pm ↑ Summary Remote/Role/LogForwarder.pm »