Net::FTP can't locate object method "new"

Discussion in 'Perl Misc' started by Henry Salvia, Dec 31, 2005.

  1. Henry Salvia

    Henry Salvia Guest

    I'm trying to install the libnet module to use Net::FTP and have run
    into a
    problem. I've checked out the bug report page for libnet and the only
    answer the
    author gave was that the install must not be complete. I did do 2
    installs, the
    1st used a "non-standard" location by running perl Makefile.PL
    the 2nd was standard. Both installs passed "make test", and both fail
    same way, code and error message below (only the host/login/passwd names
    changed to protect the guilty...). And ideas on how to troubleshoot

    Henry Salvia

    use Net::FTP ;
    use strict ;

    my $host = "hhh" ;
    my $login = "lll" ;
    my $passwd = 'ppp' ;
    my $dir = "/" ;

    my $ftp = Net::FTP->new($host) or die "Can't: [email protected]" ;

    $ftp->login($login, $passwd) or die "Can't login: ", $ftp->message ;

    $ftp->cwd($dir) ;

    my $ls = $ftp->ls() ;

    foreach my $f ( @$ls ) {
    print "\t($f)\n" ;

    $ftp->quit ;
    marvin.Cadence.COM(hjs)-/mnt4/hjs/CPAN/libnet-1.19 76 > ./spoo
    Can't locate object method "new" via package "Net::FTP::A" at
    04/lib/sun4-solaris/5.00401/IO/ line 247.
    marvin.Cadence.COM(hjs)-/mnt4/hjs/CPAN/libnet-1.19 77 >
    Henry Salvia, Dec 31, 2005
    1. Advertisements

  2. Henry Salvia

    Anno Siegel Guest

    The path name along which your perl found IO::Socket contains a line
    feed. That is probably not intentional. Also, perl 5.00401 is ancient.
    Something is messed up with your installation.

    It isn't clear what business IO::Socket has calling Net::FTP::A->new,
    but in 5.00401 line 247 in IO/ is

    my $new = $pkg->new(Timeout => $timeout);

    so apparently it does.

    Anno Siegel, Dec 31, 2005
    1. Advertisements

  3. Henry Salvia

    Henry Salvia Guest

    The line feed is simply cut-and-paste lazyness. The ancient perl is
    but it works (until now, anyway) with a wide range of modules from CPAN.
    And in fact line 11 of Net/ says "require 5.001", and I know that
    have been true in the past but not now...
    Yep: that's about where I stopped, I could see that backtracking how it
    there would take a while, since I didn't see where Net::FTP::A gets
    pulled in
    in the first place. Thanks for taking a look. I was hoping I wouldn't
    have to
    know what I'm doing, but... wish me luck.

    Henry Salvia.
    Henry Salvia, Jan 1, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.