|Syntactic Confectionery Delight|
readline error behaviorby TheHobbit (Pilgrim)
|on Nov 03, 2003 at 14:33 UTC||Need Help??|
TheHobbit has asked for the
wisdom of the Perl Monks concerning the following question:
I'm writing a class inheriting from IO::File which should read records from a formatted file. Obviously, the main thing to do, maybe the only one, is to redefine getline method.
My getline method looks like this:
The problem is that I'm unable to decide what should my method do when the file is not actually at EOF but the current line is malformed. The options appears to be 'the same thing' as IO::File->getline(), but I can not found what this 'thing' is by reading the doc, or die-ing, which would oblige me to always wrap the calls to the method into a eval block.
What I'm asking from your wisdom is then:
Thanks for helping.
update: corrected some typos