| 1 | package Object::Remote::Connector::SSH; | ||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||
| 3 | 12 | ▶ | use Object::Remote::ModuleSender; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | 12 | ▶ | use Object::Remote::Handle; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | 24 | ▶ | use String::ShellQuote; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 6 | 24 | ▶ | use Moo; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||
| 8 | with 'Object::Remote::Role::Connector::PerlInterpreter'; | ||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||
| 10 | has ssh_to => (is => 'ro', required => 1); | ||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||
| 12 | has ssh_perl_command => (is => 'lazy'); | ||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | has ssh_options => (is => 'ro', default => sub { [ '-A' ] }); | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||
| 16 | 1 | ▶ | has ssh_command => (is => 'ro', default => sub { 'ssh' }); | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | sub _build_ssh_perl_command { | ||||||||||||||||||||||||||||||||
|
Subroutine
_build_ssh_perl_command: called CC=2 SCAR=10.0
| |||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||
|
Subroutine
_build_ssh_perl_command: not called CC=2 SCAR=10.0
| |||||||||||||||||||||||||||||||||||
| 20 | 0 | my $perl_command = $self->perl_command; | |||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||
| 22 | return [ | ||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | do { my $c = $self->ssh_command; ref($c) ? @$c : $c }, | ||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||
| 24 | 0 | @{$self->ssh_options}, $self->ssh_to, | |||||||||||||||||||||||||||||||||
| 25 | shell_quote(@$perl_command), | ||||||||||||||||||||||||||||||||||
| 26 | ]; | ||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||
| 29 | 1 | ▶ | sub final_perl_command { shift->ssh_perl_command } | ||||||||||||||||||||||||||||||||
|
Subroutine
final_perl_command: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||
| 31 | 12 | ▶ | no warnings 'once'; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||
| 33 | push @Object::Remote::Connection::Guess, sub { | ||||||||||||||||||||||||||||||||||
| 34 | for ($_[0]) { | ||||||||||||||||||||||||||||||||||
| 35 | # 0-9 a-z _ - first char, those or . subsequent - hostnamish | ||||||||||||||||||||||||||||||||||
| 36 | ▶ | if (defined and !ref and /^(?:.*?\@)?[\w\-][\w\-\.]/) { | |||||||||||||||||||||||||||||||||
|
Condition0%0/6
defined $_ and not ref $_ and /^(?:.*?\@)?[\w\-][\w\-\.]/
defined $_ and not ref $_
MC/DC0%0/3
defined $_ and not ref $_ and /^(?:.*?\@)?[\w\-][\w\-\.]/
defined $_
not ref $_
/^(?:.*?\@)?[\w\-][\w\-\.]/
Truth table0%0/4
A and not(B) and C
A= defined $_B= not ref $_C= /^(?:.*?\@)?[\w\-][\w\-\.]/
| |||||||||||||||||||||||||||||||||||
| 37 | my $host = shift(@_); | ||||||||||||||||||||||||||||||||||
| 38 | return __PACKAGE__->new(@_, ssh_to => $host); | ||||||||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||
| 41 | return; | ||||||||||||||||||||||||||||||||||
| 42 | }; | ||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||
| 44 | 1; | ||||||||||||||||||||||||||||||||||