Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

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



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;
Fixed in the master branch. Thank you for reporting the issue.