On Sun, Jan 30, 2011 at 11:01:57PM +0100, Aristotle Pagaltzis wrote: > --- > ext/POSIX/lib/POSIX.pm | 437 +++++++++++------------------------------------ > ext/POSIX/lib/POSIX.pod | 7 - > ext/POSIX/t/posix.t | 2 +- > 3 files changed, 104 insertions(+), 342 deletions(-) I rather like the code culling this achieves. I've (mostly) applied it on the branch smoke-me/POSIX, along with commits that add some tests for the various exception messages. > + clearerr => 'IO::Handle->clearerr', > + fclose => 'IO::Handle->close', > + fdopen => 'IO::Handle->new_from_fd', > + feof => 'IO::Handle->eof', > + ferror => 'IO::Handle->error', > + fflush => 'IO::Handle->flush', > + fgetc => 'IO::Handle->getc', > + fgetpos => 'IO::Seekable->getpos', > + fgets => 'IO::Handle->gets', > + fileno => 'IO::Handle->fileno', > + fopen => 'IO::File->open', I specifically didn't apply the changes such as the above, because I'm not yet convinced that error messages such as Use method IO::Handle->close() instead at -e line 1 are actually good enough. It's not a class method taking zero parameters. I agree that the current message: Use method IO::Handle::close() instead at -e line 1 is also not good enough, but to my (C infested) mind that *can* be read both as "function taking zero parameters" and "name of a subroutine, parameters unknown", and my (Perl infested) mind knows that methods are just subroutines. Maybe the error message should be: Use method close() on an IO::Handle object instead at -e line 1 Whatever is decided, your refactoring makes it much easier to change it. Thanks. Nicholas ClarkThread Previous | Thread Next