Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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

by salva (Abbot)
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.

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2016-10-23 22:14 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.