FAQ

On Sun Feb 17 14:53:43 2013, tom christiansen wrote:
The documentation for IO::Handle reads:

$io->error
Returns a true value if the given handle has experienced any
errors
since it was opened or since the last call to "clearerr", or if
the
handle is invalid. It only returns false for a valid handle with
no
outstanding errors.

However, this is not true. For example, a failed read on a given
handle
can set errno to EAGAIN, yet fail to be noted by the error() method on
that
handle. This is shown by the enclosed test script, which is designed
to
trigger an error on the read. You can tell that there is a bug
because
it emits:

IMPOSSIBLE CASE #1: errno set but has_error clear

--tom
Confirming that I got the same output on Darwin/PPC and Linux/i386.

jimk

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedFeb 23, '13 at 11:47p
activeFeb 23, '13 at 11:47p
posts1
users1
websiteperl.org

1 user in discussion

James E Keenan via RT: 1 post

People

Translate

site design / logo © 2022 Grokbase