Why did you give it such a strange title? Is "::Foreign" a common usage within CPAN?

That was not probably my best decision. Anyway, in the beginning Net::SFTP::Foreign was a fork of Net::SFTP that used the OS ssh client to connect with the remote host instead of the Net::SSH::Perl module. So, Net::SSH::Perl was the native transport, and ssh the foreign one.

Later, I rewrote almost all the code, changing its API, for the 1.x series, but the name just stuck.

I used the ::Compat option, and it did not like giving a Debug option to new.

The right option recognized by Net::SFTP is lowercase debug. What happens is that Net::SFTP ignores any option it doesn't recognize while Net::SFTP::Foreign::Compat reports them as errors.

I am not sure about Net::SFTP::Foreign aiming at bug-for-bug compatibility...

The first time I used it (having successfully used Net::SFTP the day before), the upload site refused my connection saying that it had adopted a new public key.

That's how ssh handles host authentication. Net::SFTP::Foreign::Compat promises compatibility at the API level, so that you don't have to change your scripts. But under the hood it still let's ssh handle the SSH configuration in its way.

N::S::F::Compat is just a hack to let people with scripts written for Net::SFTP move to Net::SFTP::Foreign easily and in the early days it was also a way to migrate from the 0.x series to 1.x.

If you can, you should use the real Net::SFTP::Foreign API that is much more powerful, consistent and tested.


In reply to Re^3: A Confession by salva
in thread A Confession by clerew

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.