in reply to Re^3: $io->can('seek') == true, but $io->seek(pos, whence) == 'Illegal seek' - bug ?
in thread $io->can('seek') == true, but $io->seek(pos, whence) == 'Illegal seek' - bug ?
Update:Actually I had the drive to work to think about this and I'm less happy.
I understand this is not going to change, but the DWIM part of this still irks me.
I accept that if $io_obj->can('seek') is true I still need to check the return code of $io_obj->seek(pos,whence) because 'things can happen' (tm) like drives failing etc.
But I can't see how a stream can ever become seekable, so the true value from can() doesnt help the argument of perl DWIM.
So my final points are
use brain;
|
|---|