| 1 | package Git::PurePerl::Protocol::Git; | ||||||||||||
| 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 namespace::autoclean; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 4 | extends 'Git::PurePerl::Protocol'; | |||||||||||
| 8 | |||||||||||||
| 9 | 4 | has 'hostname' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||||
| 10 | 4 | has 'port' => ( is => 'ro', isa => 'Int', required => 0, default => 9418 ); | |||||||||||
| 11 | 4 | has 'project' => ( is => 'rw', isa => 'Str', required => 1 ); | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | sub connect_socket { | ||||||||||
|
Subroutine
connect_socket: called CC=3 SCAR=18.1
Pod
undocumented
| |||||||||||||
| 14 | 1 | my $self = shift; | |||||||||||
| 15 | |||||||||||||
| 16 | 1 | ▶ | my $socket = IO::Socket::INET->new( | ||||||||||
|
Condition50%1/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 table50%1/2
A
A= 'IO::Socket::INET'->new('PeerAddr', $self->hostname, 'PeerPort', $self->port, 'Proto', 'tcp')
| |||||||||||||
| 17 | PeerAddr => $self->hostname, | ||||||||||||
| 18 | PeerPort => $self->port, | ||||||||||||
| 19 | Proto => 'tcp' | ||||||||||||
| 20 | ) || die $! . ' ' . $self->hostname . ':' . $self->port; | ||||||||||||
| 21 | 0 | ▶ | $socket->autoflush(1) || die $!; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 22 | 0 | $self->read_socket($socket); | |||||||||||
| 23 | 0 | $self->write_socket($socket); | |||||||||||
| 24 | |||||||||||||
| 25 | 0 | $self->send_line( "git-upload-pack " | |||||||||||
| 26 | . $self->project | ||||||||||||
| 27 | . "\0host=" | ||||||||||||
| 28 | . $self->hostname | ||||||||||||
| 29 | . "\0" ); | ||||||||||||
| 30 | } | ||||||||||||
| 31 | |||||||||||||
| 32 | 4 | 1; | |||||||||||