Mailing List Archive

PATCH: Re: Strange failure of Net::FTP 1.08b
Here is a patch for the failure described below

Regards,
Graham.

--%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<--
--- 1.8 1995/12/11 13:10:30
+++ FTP.pm 1995/12/14 12:20:17
@@ -498,6 +498,8 @@
push(@{$list}, split(/\n/,$databuf)); ## break into lines
}

+ $data->close();
+
wantarray ? @{$list} : $list;
}

--%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<----%<--
P Van Heusden <pvh@ucthpx.uct.ac.za> writes:
>Hi Graham. I've run into quite a strange failure with Net::FTP 1.08b,
>using perl 5.002b1.
>
>If I run the following script:
>
>use Net::FTP;
>
>$ftp = Net::FTP->new("ftp.uct.ac.za");
>$ftp->login("anonymous");
>$ftp->ls();
>$ftp->ls();
>
>The second ls fails with the message:
>
>undef at /usr/local/lib/perl5/Net/FTP.pm line 490.
>
>The failure, however, goes away if I single-step over at least one of
>the ls commands in the debugger, or place a breakpoint at the second
>ls - so this sounds rather like a perl problem, but I'm sending it to
>you first to just check out for any known bugs.
>
>The code is running on a HP 9000/735, on HPUX 9.01, compiled with HP
>cc. I get the same behaviour on HPUX 10.01.
>
>Peter

--
Graham Barr <bodg@tiuk.ti.com>
Texas Instruments Ltd.