in reply to Net::SFTP methods that return handles

I have never used this module. But from the documentation it looks like it is supposed to do that - just return undef and no information on failure. Which seems pretty useless.

One option is to email the author and ask about it. You may find out that he had a reason to not throw an error. For instance it may be that that call is not well supported by sftp servers, so failure isn't really viewed as an error.

Another option is to modify your copy with various debug statements and see if you can figure out where it is deciding that things didn't work. You may be able to get it to print out a transcript of the actual interaction. If you go that path then you should be able to find out why it isn't working. Of course if the problem turns out to be that the server doesn't support the command, that won't get you very far.

The third option is to find another approach for whatever you want to do.

My approach would be to file a bug about the need for better feedback from the module on why things didn't work, and then I'd proceed to find a workaround for whatever I need to do.

  • Comment on Re: Net::SFTP methods that return handles

Replies are listed 'Best First'.
Re^2: Net::SFTP methods that return handles
by steves (Curate) on Oct 24, 2004 at 02:08 UTC

    Ahead of you there ;-)

    I contacted the author who said he no longer maintains it. He directed me to the mailing list. I posted there but there have been zero posts or responses all day. I guess it's a pretty slow mailing list -- all Perl/SSH talk.

    I added more debug and have the SSH buffer being dumped to some degree. Now I need to find documentation on the protocol so I can try and interpret it. Haven't had time for that yet.

      Well here is a draft of the standard that the module refers to. That should describe the protocol.

        Thanks!