1 package Object::Remote::Connector::SSH;
3 use Object::Remote::ModuleSender;
4 use Object::Remote::Handle;
7 with 'Object::Remote::Role::Connector::PerlInterpreter';
9 has ssh_to => (is => 'ro', required => 1);
11 has ssh_perl_command => (is => 'lazy');
13 sub _build_ssh_perl_command {
15 return [ 'ssh', '-A', $self->ssh_to, @{$self->perl_command} ];
18 sub final_perl_command { shift->ssh_perl_command }
22 push @Object::Remote::Connection::Guess, sub {
24 # 0-9 a-z _ - first char, those or . subsequent - hostnamish
25 if (defined and !ref and /^(?:.*?\@)?[\w\-][\w\-\.]/) {
26 return __PACKAGE__->new(ssh_to => $_[0]);