Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: debugging Net::Sftp::Foreign using ssh2

by salva (Monsignor)
on Dec 12, 2012 at 14:56 UTC ( #1008512=note: print w/ replies, xml ) Need Help??


in reply to debugging Net::Sftp::Foreign using ssh2

The way to check for errors on Net::SFTP::Foreign is calling the error method:

$sftp->put(...); if ($sftp->error) { ... };
Or alternatively, use the autodie feature:
my $sftp = Net::SFTP::Foreign->new(..., autodie => 1);
In order to activate debugging set...
$Net::SFTP::Foreign::debug = -1;

Also, note that libssh2/Net::SSH2 are somewhat buggy. Ensure that at least you are using the latest versions.


Comment on Re: debugging Net::Sftp::Foreign using ssh2
Select or Download Code
Re^2: debugging Net::Sftp::Foreign using ssh2
by sdetweil (Sexton) on Dec 12, 2012 at 20:11 UTC
    >In order to activate debugging set... $Net::SFTP::Foreign::debug = -1; where did you find that? there are all kinds of workarounds here, but nothing that straight forward.. thank you.. adding the debug, it does not fail..typical!.. but the debug output is good..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008512]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-09-18 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (101 votes), past polls