in reply to Re: WWW::Curl help
in thread WWW::Curl help

Hey there,
firstly thank you to everyone for replying. I went with libcurl for its support of sftp via libssh2 as well as other protocols i want to use. The assumptions for speed etc were made based on other postings here and on other pages of people that have used it as well as other CPAN modules. I did not have time to run a benchmark test though. The wikipedia callback pages explains callbacks rather well and they make sense so thank you to the first anonymous monk for directing me there.

I have another question about using libcurl with sftp, anyone have any experience with it, i don't seem to be able to pass a passphrase with success and wondering what attribute is the right attribute to set for the passphrase and how i should set it. It seems to want me to pass it as a pointer to the password, should i assume it wants me to pass a reference to $password ? Any ideas?

Replies are listed 'Best First'.
Re^3: WWW::Curl help
by Anonymous Monk on Aug 28, 2008 at 10:25 UTC
    I have another question about using libcurl with sftp, anyone have any experience with it, i don't seem to be able to pass a passphrase with success and wondering what attribute is the right attribute to set for the passphrase and how i should set it.
    What does the manual say? Thats right bittis, stop wondering and read the fine manual :)

    It seems to want me to pass it as a pointer to the password, should i assume it wants me to pass a reference to $password ? Any ideas?
    CURLOPT_URL (and all others) also wants a pointer to a zero terminated string (char* imapointer) , and you don't pass a reference there, so no, don't assume that.

      Further Updates in case anyone runs into the same problems as I, it seems that most problems originated from the customer sending me the wrong public key :/. Sorry for wasting people's time reading this

      How to I define a pointer in perl? From what i understand, translating what the manual is saying, means

      $password="pass"; $password=$password."\0"; $pointer = \$password;

      Is this correct? It does not appear to be the case

      should i be looking into the pack function of perl?

        Is this correct? It does not appear to be the case
        You are correct, that is not the case. WWW::Curl docs/tests show how to do
        $curl->setopt(CURLOPT_URL, "ftp://ftp.sunet.se/pub/www/utilities/curl/README.curl");