Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by salva (Canon)
on Dec 12, 2012 at 14:56 UTC ( [id://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..

      I can't find where I read it, but I believe $Net::SFTP::Foreign::debug is a bitmask, so -1 (equivalent to all ones in binary*) is saying "show me everything".

      * for 2's compliment based systems

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-19 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found