|Subject:||Regression in interface of getline().|
The change in 0.26 for getline() to return undef instead of empty array for EOF is a serious regression. Our code that displayed errors now does an infinite loop. The naive example in the code doesn't handle errors. The problem is that there is no documented way to determine the difference between an error and EOF. With a parse error, it is possible to continue parsing the rest of the file while EOF needs to exit the loop. Even if it isn't possible to continue parsing, we want to display the error. It should be made clear in the documentation that getline() returns undef of EOF and on error. If there is a way to distinguish between parse errors, IO errors, and EOF (undef error_input, status), then it should be mentioned. I think eof($io) will work.