Since C<warnif> can make C library or system calls, C<warnif> can clobber C<errno> and thus C<$!>.
Please replace
error:
unless (defined wantarray) {
$connect_void_warned++ or
warnings::warnif($self, "Calling connect in void context is deprecated");
croak "Net::SSH2: failed to connect to $_[0]:$_[1]: $!"
}
return;
with
error:
unless (defined wantarray) {
my $errno = $!;
$connect_void_warned++ or
warnings::warnif($self, "Calling connect in void context is deprecated");
croak "Net::SSH2: failed to connect to $_[0]:$_[1]: $errno"
}
return;
or better yet with
error:
unless (defined wantarray) {
my $errno = $!;
$connect_void_warned++ or
warnings::warnif($self, "Calling connect in void context is deprecated");
$self->die_with_error();
}
return;
This queue is for tickets about the Net-SSH2 CPAN distribution.
Report information
The Basics
People
Owner:
Nobody in particular
Requestors:
IKEGAMI [...] cpan.org
Cc:
AdminCc:
BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)
This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.
Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.