Cogit/Protocol/SSH.pm

filter: Statementstmt 66.6% 18 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 66.6% 22 / 33 CC 1 SCAR 1.8
CC
1
Cov
67%
connect_socket
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Cogit/Object.pm ↑ Summary Cogit/Protocol/File.pm »
1 package Cogit::Protocol::SSH;
2 4 $Cogit::Protocol::SSH::VERSION = '0.001001';
3 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use MooX::Types::MooseLike::Base 'Str';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use IPC::Open2;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 extends 'Cogit::Protocol';
9  
10 4 has hostname => (
11 is => 'ro',
12 isa => Str,
13 required => 1,
14 );
15  
16 4 has username => (
17 is => 'ro',
18 isa => Str,
19 );
20  
21 4 has path => (
22 is => 'ro',
23 isa => Str,
24 required => 1,
25 );
26  
27 0 ▶sub connect_socket {
Subroutine connect_socket: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my $self = shift;
29  
30 0 my ($read, $write);
31 0 my $connect = join('@', grep { defined } $self->username, $self->hostname);
32 0 my $pid = open2($read, $write, "ssh", $connect, "-o", "BatchMode yes",
33 "git-upload-pack", $self->path,);
34  
35 0 $read->autoflush(1);
36 0 $write->autoflush(1);
37 0 $self->read_socket($read);
38 0 $self->write_socket($write);
39 }
40  
41 4 1;
42  
43 __END__
« Cogit/Object.pm ↑ Summary Cogit/Protocol/File.pm »