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

H

Henry Salvia

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
PREFIX=/mypath
the 2nd was standard. Both installs passed "make test", and both fail
the
same way, code and error message below (only the host/login/passwd names
were
changed to protect the guilty...). And ideas on how to troubleshoot
this?
Thanks

Henry Salvia
(e-mail address removed)

#!/usr/local/bin/perl
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: $@" ;

$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
/usr/local/perl5.0
04/lib/sun4-solaris/5.00401/IO/Socket.pm line 247.
marvin.Cadence.COM(hjs)-/mnt4/hjs/CPAN/libnet-1.19 77 >
 
A

Anno Siegel

Henry Salvia said:
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
PREFIX=/mypath
the 2nd was standard. Both installs passed "make test", and both fail
the
same way, code and error message below (only the host/login/passwd names
were
changed to protect the guilty...). And ideas on how to troubleshoot
this?
Thanks

Henry Salvia
(e-mail address removed)

#!/usr/local/bin/perl
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: $@" ;

$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
/usr/local/perl5.0
04/lib/sun4-solaris/5.00401/IO/Socket.pm line 247.
marvin.Cadence.COM(hjs)-/mnt4/hjs/CPAN/libnet-1.19 77 >

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/Socket.pm is

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

so apparently it does.

Anno
 
H

Henry Salvia

Anno said:
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.

The line feed is simply cut-and-paste lazyness. The ancient perl is
ancient,
but it works (until now, anyway) with a wide range of modules from CPAN.
And in fact line 11 of Net/FTP.pm says "require 5.001", and I know that
may
have been true in the past but not now...
It isn't clear what business IO::Socket has calling Net::FTP::A->new,
but in 5.00401 line 247 in IO/Socket.pm is

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

so apparently it does.
Anno

Yep: that's about where I stopped, I could see that backtracking how it
got
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top