i humbly submit my request for a nugget of wisdom o wise monks.
i'm trying to export some variables from a module into another, and that seems to be working as expected, however, net::openssh fails to establish a connection using the imported ones. if i declare the variables locally, everything works fine.
our @ISA = 'Exporter';
our @EXPORT_OK = qw($user $pass $enpass);
our $user = '....';
our $pass = '....';
our $enpass = '....';
use Creds qw($user $pass $enpass);
my $host = $ARGV;
my $timeout = 5;
my $ssh = Net::OpenSSH->new("$user:$pass\@$host", timeout => 10);
$ssh->error and die "unable to connect to host: ". $ssh->error;
my ($pty, $pid) = $ssh->open2pty();
my $expect = Expect->init($pty);
i just keep getting timeout error (unable to connect to host: unable to establish master SSH connection: login timeout at).
any insight is greatly appreciated.