| 1 | package Cogit::Protocol::Git; | ||||||||||||
| 2 | 4 | $Cogit::Protocol::Git::VERSION = '0.001001'; | |||||||||||
| 3 | 4 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 4 | ▶ | use MooX::Types::MooseLike::Base qw( Int Str ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 4 | ▶ | use IO::Socket::INET; | ||||||||||
|
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 | has port => ( | ||||||||||||
| 17 | is => 'ro', | ||||||||||||
| 18 | isa => Int, | ||||||||||||
| 19 | 0 | ▶ | default => sub { 9418 }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 20 | 4 | ); | |||||||||||
| 21 | |||||||||||||
| 22 | 4 | has project => ( | |||||||||||
| 23 | is => 'rw', | ||||||||||||
| 24 | isa => Str, | ||||||||||||
| 25 | required => 1, | ||||||||||||
| 26 | ); | ||||||||||||
| 27 | |||||||||||||
| 28 | 0 | ▶ | sub connect_socket { | ||||||||||
|
Subroutine
connect_socket: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||
| 29 | 0 | my $self = shift; | |||||||||||
| 30 | |||||||||||||
| 31 | 0 | ▶ | my $socket = IO::Socket::INET->new( | ||||||||||
|
Condition0%0/2
'IO::Socket::INET'->new('PeerAddr', $self->hostname, 'PeerPort', $self->port, 'Proto', 'tcp') || die($! . ' ' . $self->hostname . ':' . $self->port)
MC/DC0%0/1
'IO::Socket::INET'->new('PeerAddr', $self->hostname, 'PeerPort', $self->port, 'Proto', 'tcp') || die($! . ' ' . $self->hostname . ':' . $self->port)
'IO::Socket::INET'->new('PeerAddr', $self->hostname, 'PeerPort', $self->port, 'Proto', 'tcp')
Truth table0%0/2
A
A= 'IO::Socket::INET'->new('PeerAddr', $self->hostname, 'PeerPort', $self->port, 'Proto', 'tcp')
| |||||||||||||
| 32 | PeerAddr => $self->hostname, | ||||||||||||
| 33 | PeerPort => $self->port, | ||||||||||||
| 34 | Proto => 'tcp' | ||||||||||||
| 35 | ) || die $! . ' ' . $self->hostname . ':' . $self->port; | ||||||||||||
| 36 | 0 | ▶ | $socket->autoflush(1) || die $!; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 37 | 0 | $self->read_socket($socket); | |||||||||||
| 38 | 0 | $self->write_socket($socket); | |||||||||||
| 39 | |||||||||||||
| 40 | 0 | $self->send_line( | |||||||||||
| 41 | "git-upload-pack " . $self->project . "\0host=" . $self->hostname . "\0"); | ||||||||||||
| 42 | } | ||||||||||||
| 43 | |||||||||||||
| 44 | 4 | 1; | |||||||||||
| 45 | |||||||||||||
| 46 | __END__ | ||||||||||||