Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 33549
Status: new
Priority: 0/
Queue: libnet

Owner: Nobody in particular
Requestors: pmqs [...]

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

Subject: Use of sysread in Net::FTP
Download (untitled) / with headers
text/plain 939b
Hi Graham, this is a followup to bug #33268 regarding the non-standard timeout parameter used in the read method that Net::FTP::retr I was testing a change to IO::Uncompress::Base that removed the use of the offset parameter when I carried out a read. I had written a script to check that it worked with Net::FTP::retr, but I kept getting the wrong result. Anyway, after much head scratching the problem turns out to be the old chestnut -- never mix buffered & non-buffered IO. The read method accessed by Net::FTP::retr uses sysread to read data from the socket. Unfortunately the dataconn class also implements the eof method. In my code I make use of eof, thus I get the wrong output when I read from a Net::FTP::retr object in my code. I'm not sure what your views are on using read instead of sysread when reading from the socket in Net::FTP. If you aren't in favor of a change a health warning in the pod might be useful. Paul

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to