in reply to Re: Net::SFTP using ssh_args woes
in thread Net::SFTP using ssh_args woes
with no further use of @_ in init(). It looks like you want something like (completely untested):sub new { my $class = shift; my $sftp = bless { }, $class; $sftp->{host} = shift; $sftp->init(@_); } sub init { my $sftp = shift; my %param = @_; $sftp->{debug} = delete $param{debug}; $param{ssh_args} ||= []; $sftp->{_msg_id} = 0; my $ssh = Net::SSH::Perl->new($sftp->{host}, protocol => 2, debug => $sftp->{debug}, @{ $param{ssh_args} }); ...
Which is basically what the doc says, except that both modules say reference to a list where they mean reference to an array.$sftp = Net::SFTP::->new($host, user => $username, password => $password, ssh_args => [ options => [ "StrickHostKeyChecking no" ] ] );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SFTP using ssh_args woes
by b10m (Vicar) on Jan 11, 2004 at 15:07 UTC |