File Coverage

blib/lib/Git/PurePerl/Protocol/File.pm
Criterion Covered Total %
statement 15 22 68.1
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 29 68.9


line stmt bran cond sub pod time code
1             package Git::PurePerl::Protocol::File;
2 4     4   320 use Moose;
  4         6  
  4         25  
3 4     4   16332 use MooseX::StrictConstructor;
  4         6  
  4         26  
4 4     4   7544 use Moose::Util::TypeConstraints;
  4         6  
  4         30  
5 4     4   4846 use IPC::Open2;
  4         7  
  4         201  
6 4     4   16 use namespace::autoclean;
  4         6  
  4         25  
7              
8             extends 'Git::PurePerl::Protocol';
9              
10             has 'path' => ( is => 'ro', isa => 'Str', required => 1 );
11              
12             sub connect_socket {
13 0     0 0   my $self = shift;
14              
15 0           my ($read, $write);
16 0           my $pid = open2(
17             $read, $write,
18             "git-upload-pack",
19             $self->path,
20             );
21              
22 0           $read->autoflush(1);
23 0           $write->autoflush(1);
24 0           $self->read_socket($read);
25 0           $self->write_socket($write);
26             }
27              
28             1;