Skip Menu |

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

Report information
The Basics
Id: 117707
Status: rejected
Priority: 0/
Queue: Net-SSH2

People
Owner: Nobody in particular
Requestors: mc08990 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::SSH2 ->close on sftp or file?
Date: Fri, 9 Sep 2016 14:38:45 -0400
To: bug-Net-SSH2 [...] rt.cpan.org
From: Michael Carey <mc08990 [...] gmail.com>
Hello, In the examples for libssh2, after a remote file is open and the IO loop is finished there is a call to libssh_sftp_close() and then libssh_sftp_shutdown(). This is at least syntactically analogous to local file IO where a file is closed at the end. https://www.libssh2.org/examples/sftp_write.html Questions: Where are these functions accessible in Net::SSH2? How can I insure a file I am writing to gets closed if, for instance, I want to go on to do other things with the Net::SSH2 object after writing a remote file?
The file object Net::SSH2::File is closed from its DESTROY method. Similarly, Net::SSH2::SFTP object is shutdown from its DESTROY method. BTW, please, don't use the bug tracker for sending questions. Post them in PerlMonks or StackOverflow.