zwon,

Thanks for helping me think around this problem. I looked at all the @ISA = statements and require statements and saw exactly what you described.

Adding use IO::Socket::INET; to my code did not fix the problem but fortunately I had already stumbled across the answer.

In trying to execute your quick check on my platform I accidentally typed in the following:

perl -MNet::FTP -MIO::Socket::INET -e 'print Net::FTP::A->can("new") || "can not", "\n"'

and was surprised to get the answer

can not

Notice that I had omitted the ::A in the first -M switch. When I corrected the check to be exactly as you typed it, I got the expected result. Adding use IO::Socket::INET; to the existing code made it just like the mistyped check. That is, using the packages Net::FTP and IO::Socket::INET but not explicitly using Net::FTP::A.

So, by adding the two lines:

use Net::FTP::A; use IO::Socket::INET;
to my code I avoided the runtime error.


Thanks,
Cefu

P.S. I'm still confused as to why something I'm doing during processing could selectively trigger this behavior. Is this a bug that I should report to the Net::FTP author or am I doing something extraordinary to trigger this condition?


In reply to Re^2: Causing discord between Net::FTP and IO::Sockets by Cefu
in thread Causing discord between Net::FTP and IO::Sockets by Cefu

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.