Skip Menu |

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id: 49447
Status: resolved
Priority: 0/
Queue: Net-SSH2

People
Owner: Nobody in particular
Requestors: jchnorton [...] verizon.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.24
Fixed in: (no value)



Subject: Undefined value for $wantarray in Net::SSH2 connect() method
In a situation where I want to attempt connection to a remote host which might be down, I'm getting a failure in the call to connect(): my $ssh = Net::SSH2->new(); $ssh2->poll(1); if (!$ssh2->connect($host)) { print "Failed connection ('$host' still down')\n"; return 0; } and getting the error: Use of uninitialized value in numeric eq (==) at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/Net/SSH2.pm line 226 This is probably because of the comparison of $wantarray to undef in line 226: if ($wantarray == undef) { which seems as easy to fix as: if (!defined($wantarray)) {
Fixed in 0.25, thank you. -- Rafael