Subject: | MemberRead->getline too helpful |
getline()
Returns the next line from the currently open member. Makes sense only for text files. A read error is considered fatal enough to die. Returns undef on eof. All subsequent calls would return undef, unless a rewind() is called. Note: The line returned has the newline removed.
It removes the newline on the end quite effectively mangling the data. I can put the newline back, but I cannot know if there was a newline at the end of the file or not. Thus, data is lost.
I hereby coin the term "inconvenience feature" to describe this sort of behavior.
Because of backwards compatibility concerts, the only thing I can think to do is implement a new method with a new name. readline() or something.