in reply to Re: Testing for read() failures on different platforms
in thread Testing for read() failures on different platforms
What on earth would generate a read failure?
Networked file systems, corrupt media, broken pipe, etc. Not checking for read errors can lead to evil bugs :-)
As to the OPs question:
... can anyone advise me on a better way for testing cross platform read failures?
I find redefining read is the simplest solution. At its most basic just adding
BEGIN { *CORE::GLOBAL::read = sub (*\$$;$) { return undef }; };
to your test file will always cause read to fail.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Testing for read() failures on different platforms
by leriksen (Curate) on Jul 28, 2004 at 01:06 UTC | |
|
Re^3: Testing for read() failures on different platforms
by leriksen (Curate) on Jul 28, 2004 at 07:13 UTC |