Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 7180
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: thomas.delattre [...] siih5962.fr
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.19
Fixed in: (no value)



Subject: Bug on AIX v1.19 => unique_name and put_unique function
Hello, I try to use FTP::Net on my AIX v5.1 server with Perl 5.6.0 and I had a problem with the unique_name and put_unique functions : it return anything (normally, it should return the name of the unique file, I think...) Thanks by advance for the help ! Thomas Here is the simple script I try to execute : #!/usr/bin/perl use Net::FTP; @files = @ARGV; $remotehost = "myserver"; $remotedir = "/tmp"; $user = "myuser"; $pass = "mypass"; print "Connecting...\n"; $ftp = Net::FTP->new("$remotehost", Debug => 0) or die "cannot connect:"; print "Logging in...\n"; $ftp->login("$user","$pass") or die "cannot login: ",$ftp->message; print "Changing to $remotedir...\n"; $ftp->cwd($remotedir) or die "cannot cwd to $remotedir: ",$ftp->message ; print "Beginning Transfer...\n"; foreach $file (@files) { print "transfer $file..\n"; $ufilename = $ftp->put_unique($file); print $ftp->unique_name(); print $ufilename,"\n"; } $ftp->quit(); print "Done.\n"; ###################################### and Here is the result on the screen : [root@myserver1]:/tmp/test # test_ftp.perl TEST Connecting... Logging in... Changing to /tmp... Beginning Transfer... transfer TEST.. Done. [root@siihr7]:/tmp/test #
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #7180] Bug on AIX v1.19 => unique_name and put_unique function
Date: Mon, 2 Aug 2004 08:50:21 +0100
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On 30 Jul 2004, at 15:33, Guest via RT wrote: Show quoted text
> Hello, I try to use FTP::Net on my AIX v5.1 server with Perl 5.6.0 and > I had a problem with the unique_name and put_unique functions : it > return anything (normally, it should return the name of the unique > file, I think...) > Thanks by advance for the help ! > > Thomas > > Here is the simple script I try to execute : > #!/usr/bin/perl > > use Net::FTP; > @files = @ARGV; > > $remotehost = "myserver"; > $remotedir = "/tmp"; > $user = "myuser"; > $pass = "mypass"; > > print "Connecting...\n"; > $ftp = Net::FTP->new("$remotehost", Debug => 0) or > die "cannot connect:";
Can you set Debug to 1 and send the output. Graham.
From: thomas.delattre [...] siih5962.fr
Hi graham, here is the output Thanks for your help ! Tom Connecting... Net::FTP>>> Net::FTP(2.75) Net::FTP>>> Exporter(5.562) Net::FTP>>> Net::Cmd(2.26) Net::FTP>>> IO::Socket::INET(1.25) Net::FTP>>> IO::Socket(1.26) Net::FTP>>> IO::Handle(1.21) Net::FTP=GLOB(0x202d54a8)<<< 220 myserver serveur FTP (Version 4.1 Sat Sep 7 14:3 1:53 CDT 2002) prêt. Logging in... Net::FTP=GLOB(0x202d54a8)>>> user myuser Net::FTP=GLOB(0x202d54a8)<<< 331 Mot de passe requis pour myuser. Net::FTP=GLOB(0x202d54a8)>>> PASS .... Net::FTP=GLOB(0x202d54a8)<<< 230-Last unsuccessful login: jeu 15 avr 14:02:03 DF T 2004 on /dev/pts/18 from mach1 Net::FTP=GLOB(0x202d54a8)<<< 230-Last login: lun 2 aoû 10:31:04 DFT 2004 on ftp from mach1 Net::FTP=GLOB(0x202d54a8)<<< 230 Utilisateur myuser connecté. Changing to /tmp... Net::FTP=GLOB(0x202d54a8)>>> CWD /tmp Net::FTP=GLOB(0x202d54a8)<<< 250 Exécution de la commande CWD terminée. Beginning Transfer... transfer HTIN572.. Net::FTP=GLOB(0x202d54a8)>>> PORT 10,0,15,40,129,3 Net::FTP=GLOB(0x202d54a8)<<< 200 Exécution de la commande PORT terminée. Net::FTP=GLOB(0x202d54a8)>>> STOU TEST Net::FTP=GLOB(0x202d54a8)<<< 150 FICHIER : TEST.14 Net::FTP=GLOB(0x202d54a8)<<< 226 Transfert terminé (nom de fichier unique :TEST.14). Net::FTP=GLOB(0x202d54a8)>>> QUIT Net::FTP=GLOB(0x202d54a8)<<< 221 Au revoir. Done. [gbarr@pobox.com - Mon Aug 2 04:18:16 2004]: Show quoted text
> On 30 Jul 2004, at 15:33, Guest via RT wrote:
> > Hello, I try to use FTP::Net on my AIX v5.1 server with Perl 5.6.0
and Show quoted text
> > I had a problem with the unique_name and put_unique functions : it > > return anything (normally, it should return the name of the unique > > file, I think...) > > Thanks by advance for the help ! > > > > Thomas > > > > Here is the simple script I try to execute : > > #!/usr/bin/perl > > > > use Net::FTP; > > @files = @ARGV; > > > > $remotehost = "myserver"; > > $remotedir = "/tmp"; > > $user = "myuser"; > > $pass = "mypass"; > > > > print "Connecting...\n"; > > $ftp = Net::FTP->new("$remotehost", Debug => 0) or > > die "cannot connect:";
> > Can you set Debug to 1 and send the output. > > Graham. >
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #7180] Bug on AIX v1.19 => unique_name and put_unique function
Date: Mon, 2 Aug 2004 22:57:36 +0100
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On 2 Aug 2004, at 09:32, Guest via RT wrote: Show quoted text
> Net::FTP=GLOB(0x202d54a8)<<< 200 Exécution de la commande PORT > terminée. > Net::FTP=GLOB(0x202d54a8)>>> STOU TEST > Net::FTP=GLOB(0x202d54a8)<<< 150 FICHIER : TEST.14 > Net::FTP=GLOB(0x202d54a8)<<< 226 Transfert terminé (nom de fichier > unique :TEST.14).
Ah, this is all because there is no standard how the server communicates the unique file name back to the client. And also the fact that the messages from your server are in french, so they do not match any of the patterns for extracting the name. I will think a bit to see if we can make things a bit better, but in the meantime you can modify line 762 in FTP.pm to match the test on the 150 line and extract the filename Graham. Show quoted text
> > Net::FTP=GLOB(0x202d54a8)>>> QUIT > Net::FTP=GLOB(0x202d54a8)<<< 221 Au revoir. > Done. > > [gbarr@pobox.com - Mon Aug 2 04:18:16 2004]: >
>> On 30 Jul 2004, at 15:33, Guest via RT wrote:
>>> Hello, I try to use FTP::Net on my AIX v5.1 server with Perl 5.6.0
> and
>>> I had a problem with the unique_name and put_unique functions : it >>> return anything (normally, it should return the name of the unique >>> file, I think...) >>> Thanks by advance for the help ! >>> >>> Thomas >>> >>> Here is the simple script I try to execute : >>> #!/usr/bin/perl >>> >>> use Net::FTP; >>> @files = @ARGV; >>> >>> $remotehost = "myserver"; >>> $remotedir = "/tmp"; >>> $user = "myuser"; >>> $pass = "mypass"; >>> >>> print "Connecting...\n"; >>> $ftp = Net::FTP->new("$remotehost", Debug => 0) or >>> die "cannot connect:";
>> >> Can you set Debug to 1 and send the output. >> >> Graham. >>
> > >