Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id:
30932
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
srinivasn [...] softential.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Bug report in Net::SSH2
Date: Fri, 23 Nov 2007 18:23:09 +0530
To: bug-Net-SSH2@rt.cpan.org
From: Srinivas N <srinivasn@softential.com>
Hi,

I have been testing / using Net::SSH2 Perl module.

When we are using "connect" method to poll to remote system, it is simpling exiting when the system is not reachable. We face this problem when we embed the Perl script with CGI page. We are not able to catch the error while it exits.

We have observed that in SSH2.pm file in poll subroutine it is croak instead of return, which should return the status of the poll.

Hope you understand my concern and try to rectify this error soon.

Thanks,
Srinivas.

From: jpalmer7@hotmail.com
On Fri Nov 23 07:51:59 2007, srinivasn@softential.com wrote:
Show quoted text
> We have observed that in SSH2.pm file in poll subroutine it is croak > instead of return, which should return the status of the poll.
Note that even if you change the croak to a return, calling error() does not return an error code.
CC: srinivasn@softential.com
Subject: Re: [rt.cpan.org #30932] Bug report in Net::SSH2
Date: Fri, 21 Nov 2008 15:27:56 +0530
To: bug-Net-SSH2@rt.cpan.org
From: Srinivas N <srinivasn@softential.com>
Hi John,

Thank for your reply.

Is there no way that we can catch / report an error when the remote system is not reachable ?

Awaiting for your reply.
Srinivas.

On Thu, 2008-11-20 at 13:37 -0500, J. Palmer via RT wrote:
Show quoted text
<URL: http://rt.cpan.org/Ticket/Display.html?id=30932 >

On Fri Nov 23 07:51:59 2007, srinivasn@softential.com wrote:
> We have observed that in SSH2.pm file in poll subroutine it is croak
> instead of return, which should return the status of the poll.

Note that even if you change the croak to a return, calling error() does
not return an error code.
Currently, "connect" dies when it fails if it is being used in void context. I.e.: $ssh->connect($host); # dies on failure If doesn't die if the return value is checked: if ($ssh->connect($host)) { # never dies


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.