| 1 | package Net::SSH::Mechanize::ConnectParams; | ||||||||||
| 2 | 16 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 16 | our $VERSION = '0.1.3'; # VERSION | |||||||||
| 5 | |||||||||||
| 6 | 16 | has 'host' => ( | |||||||||
| 7 | isa => 'Str', | ||||||||||
| 8 | is => 'rw', | ||||||||||
| 9 | required => 1, | ||||||||||
| 10 | ); | ||||||||||
| 11 | |||||||||||
| 12 | 16 | has 'user' => ( | |||||||||
| 13 | isa => 'Str', | ||||||||||
| 14 | is => 'rw', | ||||||||||
| 15 | ); | ||||||||||
| 16 | |||||||||||
| 17 | 16 | has 'password' => ( | |||||||||
| 18 | isa => 'Str', | ||||||||||
| 19 | is => 'rw', | ||||||||||
| 20 | predicate => 'has_password', | ||||||||||
| 21 | ); | ||||||||||
| 22 | |||||||||||
| 23 | 16 | has 'port' => ( | |||||||||
| 24 | isa => 'Int', | ||||||||||
| 25 | is => 'rw', | ||||||||||
| 26 | default => 22, | ||||||||||
| 27 | ); | ||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | sub ssh_cmd { | ||||||||
|
Subroutine
ssh_cmd: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 30 | 0 | my $self = shift; | |||||||||
| 31 | |||||||||||
| 32 | 0 | my @cmd = ('-t', $self->host, 'sh'); | |||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | unshift @cmd, defined $self->user? ('-l', $self->user) : (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | ▶ | unshift @cmd, defined $self->port? ('-p', $self->port) : (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | unshift @cmd, '/usr/bin/ssh'; | |||||||||
| 37 | 0 | return @cmd; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | 16 | __PACKAGE__->meta->make_immutable; | |||||||||
| 43 | 16 | 1; | |||||||||
| 44 | __END__ | ||||||||||