sftp; Emits a warning if the operation fails.

Discussion in 'Perl Misc' started by okey, Apr 3, 2009.

  1. okey

    okey Guest

    Changing to net::sftp from ftp. What does this mean (in discussing
    how a particular method fails)

    Emits a warning if the operation fails.

    Are they talking about the return status?, or is there something else
    that must be captured or monitored?

    Thank you

    Example text: =============

    $sftp->do_remove($path)

    Sends a SSH_FXP_REMOVE command to remove the remote file $path.

    Emits a warning if the operation fails.

    Returns the status code for the operation. To turn the status code
    into a text message, take a look at the fx2txt function in
    Net::SFTP::Util.
    okey, Apr 3, 2009
    #1
    1. Advertising

  2. okey

    Jim Gibson Guest

    In article
    <>,
    okey <> wrote:

    > Changing to net::sftp from ftp. What does this mean (in discussing
    > how a particular method fails)
    >
    > Emits a warning if the operation fails.
    >
    > Are they talking about the return status?, or is there something else
    > that must be captured or monitored?
    >
    > Thank you
    >
    > Example text: =============
    >
    > $sftp->do_remove($path)
    >
    > Sends a SSH_FXP_REMOVE command to remove the remote file $path.
    >
    > Emits a warning if the operation fails.
    >
    > Returns the status code for the operation. To turn the status code
    > into a text message, take a look at the fx2txt function in
    > Net::SFTP::Util.


    A quick glance at the source code for the Net::SFT module reveals that
    it uses the croak routine of the Carp module for "emitting" error
    messages. While the do_remove function is not part of the Net::SFTP
    package itself, the do_read module is and uses croak, so do_remove is
    probably similar. The croak routine prints a message to standard error
    output, like die, but gives the line of the calling program (your
    program) instead of the module.

    You can view the source code for Net::SFTP by executing 'perldoc -m
    Net::SFTP' or browsing to

    <http://cpansearch.perl.org/src/DBROBINS/Net-SFTP-0.10/lib/Net/SFTP.pm>

    --
    Jim Gibson
    Jim Gibson, Apr 3, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shurik
    Replies:
    1
    Views:
    339
    Steve
    Jan 3, 2006
  2. Oscar Onorato

    Methods for building Web Custom Control that emits Javascript

    Oscar Onorato, Jan 7, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    102
    Oscar Onorato
    Jan 7, 2005
  3. Oscar Onorato

    Methods for building Web Custom Control that emits Javascript

    Oscar Onorato, Jan 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    124
    Oscar Onorato
    Jan 7, 2005
  4. MaggotChild

    Net::SFTP Fails, sftp OK

    MaggotChild, Oct 28, 2009, in forum: Perl Misc
    Replies:
    2
    Views:
    975
    C.DeRykus
    Oct 29, 2009
  5. Kevin13
    Replies:
    3
    Views:
    925
    Kevin13
    Dec 1, 2009
Loading...

Share This Page