in reply to $io->can('seek') == true, but $io->seek(pos, whence) == 'Illegal seek' - bug ?
If you look at the code for IO::File, you see this line:
@ISA = qw(IO::Handle IO::Seekable Exporter);
And in IO::FILE's document, it is also stated that: "IO::File inherits from IO::Handle and IO::Seekable. It extends these classes with methods that are specific to file handles.", so it is not a surprise that it inherits seek().
We are looking at two totally different aspects here:
I don't classify this as a bug, although a different person might design the class inheritance structure differently, so this could be handled in a more sophisticated and delicate way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $io->can('seek') == true, but $io->seek(pos, whence) == 'Illegal seek' - bug ?
by leriksen (Curate) on Nov 15, 2004 at 05:33 UTC | |
by pg (Canon) on Nov 15, 2004 at 06:07 UTC | |
by hakkr (Chaplain) on Nov 15, 2004 at 14:46 UTC | |
by revdiablo (Prior) on Nov 15, 2004 at 20:12 UTC | |
by leriksen (Curate) on Nov 15, 2004 at 21:47 UTC |