PurePerl/Protocol/SSH.pm

filter: Statementstmt 68.9% 20 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 69.4% 25 / 36 CC 1 SCAR 1.5
CC
1
Cov
69%
connect_socket
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« PurePerl/NewObject/Tree.pm ↑ Summary PurePerl/Protocol/File.pm »
1 package Git::PurePerl::Protocol::SSH;
2 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use Moose::Util::TypeConstraints;
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::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 extends 'Git::PurePerl::Protocol';
9  
10 4 has 'hostname' => ( is => 'ro', isa => 'Str', required => 1 );
11 4 has 'username' => ( is => 'ro', isa => 'Str', required => 0 );
12 4 has 'path' => ( is => 'ro', isa => 'Str', required => 1 );
13  
14 0 ▶sub connect_socket {
Subroutine connect_socket: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $self = shift;
16  
17 0 my ($read, $write);
18 0 my $connect = join('@', grep {defined} $self->username, $self->hostname);
19 0 my $pid = open2(
20 $read, $write,
21 "ssh", $connect,
22 "-o", "BatchMode yes",
23 "git-upload-pack", $self->path,
24 );
25  
26 0 $read->autoflush(1);
27 0 $write->autoflush(1);
28 0 $self->read_socket($read);
29 0 $self->write_socket($write);
30 }
31  
32 4 1;
« PurePerl/NewObject/Tree.pm ↑ Summary PurePerl/Protocol/File.pm »