in reply to Setting $! to custom values

Leo,

Please bear with me for a second as I think out loud. You are trying to overload IO::File and are overloading getline. The inconvenience is that getline's error reporting method relies on $! and you apparently can't "fit" your errors into the set specified by the errnos (and the set cannot be expanded without XS, and probably shouldn't be expanded anyway). In other words, IO::File has proven impractical for your class to inherit from because of a too restrictive error reporting mechanism.

In my opinion, this means that you should not be inheriting from IO::File. Your class must report errors in a way not contemplated by the designers of IO::File. In my opinion, your class and IO::File can not be associated by an ISA relationship, due to this mismatch. In my opinion (and I am no expert on IO::File, so I truly apologize if I misconstrue), one of the apparent implications of the error reporting design of IO::File is that classes that need to report errors beyond "OS errors" cannot really inherit from the class. I would backtrack, redesign your inheritance tree, perhaps document this experience and chalk it up to learning "the hard way" a limitation of IO::File.

,welchavw