develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #113390] Net::FTP notice read() error on local file

From:
James E Keenan via RT
Date:
September 8, 2013 02:58
Subject:
[perl #113390] Net::FTP notice read() error on local file
Message ID:
rt-3.6.HEAD-1873-1378609100-1259.113390-15-0@perl.org
On Sat May 26 16:44:40 2012, kryde wrote:
> In Net::FTP version 2.77, when doing a put() if there's an error from
> read() it seems to be silently treated as normal eof, where I hoped it
> would gives some sort of error.
> 
> I see the code notices an error from binmode(), or socket write() and
> close(), and gives an undef return, but apparently not for read()
> trouble.
> 
> The foo.pl below simulates a read error with a tied file handle.
> I wonder if the $ftp->put() could return undef in this case.
> 
> Dunno if it should also carp() or $ftp->message() or whatever for such
> local errors.  Carp might be orright for interactive use, but from a
> program you'd prefer to get a message or something and display it in
> your own way.  I suppose for compatibility any change to carp vs message
> or $! etc might have to be just an option.
> 
> 


Net::FTP, as part of the libnet distribution, now is maintained on CPAN.
 Accordingly, I have transferred this ticket to libnet's bug queue at
https://rt.cpan.org/Ticket/Display.html?id=88492.

Closing this ticket.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=113390



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About