File Coverage

blib/lib/Cogit/Protocol/File.pm
Criterion Covered Total %
statement 12 19 63.1
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 25 64.0


line stmt bran cond sub pod time code
1             package Cogit::Protocol::File;
2             $Cogit::Protocol::File::VERSION = '0.001001';
3 4     4   15 use Moo;
  4         4  
  4         22  
4 4     4   7269 use MooX::Types::MooseLike::Base 'Str';
  4         6  
  4         179  
5 4     4   17 use IPC::Open2;
  4         7  
  4         123  
6 4     4   14 use namespace::clean;
  4         4  
  4         25  
7              
8             extends 'Cogit::Protocol';
9              
10             has path => (
11             is => 'ro',
12             isa => Str,
13             required => 1,
14             );
15              
16             sub connect_socket {
17 0     0 0   my $self = shift;
18              
19 0           my ($read, $write);
20 0           my $pid = open2(
21             $read, $write,
22             "git-upload-pack",
23             $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             1;
33              
34             __END__
35              
36             =pod
37              
38             =encoding UTF-8
39              
40             =head1 NAME
41              
42             Cogit::Protocol::File
43              
44             =head1 VERSION
45              
46             version 0.001001
47              
48             =head1 AUTHOR
49              
50             Arthur Axel "fREW" Schmidt <cogit@afoolishmanifesto.com>
51              
52             =head1 COPYRIGHT AND LICENSE
53              
54             This software is copyright (c) 2017 by Arthur Axel "fREW" Schmidt.
55              
56             This is free software; you can redistribute it and/or modify it under
57             the same terms as the Perl 5 programming language system itself.
58              
59             =cut