In perl.git, the branch smoke-me/POSIX has been created <http://perl5.git.perl.org/perl.git/commitdiff/4e7931e6b1b025e56c7b73a89ecec290a7d40018?hp=0000000000000000000000000000000000000000>
at 4e7931e6b1b025e56c7b73a89ecec290a7d40018 (commit) - Log ----------------------------------------------------------------- commit 4e7931e6b1b025e56c7b73a89ecec290a7d40018 Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 16:41:12 2011 +0200 Test the diagnostics for usage messages for POSIX wrapper functions. Regularise the 3 inconsistent messages. M MANIFEST M ext/POSIX/lib/POSIX.pm A ext/POSIX/t/usage.t commit d7d0d6b065ca7bbbae69f827f19f1b93c87ed0f7 Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 15:20:56 2011 +0200 In POSIX, improve the diagnostic for the "use $method" instead. In the error message, name the POSIX function that was called, as well as the suggested replacement method. This rephrasing was in the patch supplied by Aristotle Pagaltzis, but I have retained the existing POSIX use of :: when describing the method, because given two less than great choices, I'm inclined to favour retaining the status quo and one change over two changes. M ext/POSIX/lib/POSIX.pm M ext/POSIX/t/unimplemented.t commit 1e721acb2389122d9962a0cbe431374475a1a47d Author: Aristotle Pagaltzis <pagalt...@gmx.de> Date: Wed Aug 31 14:59:57 2011 +0200 In POSIX, drastically simplify the wrappers for "unimplemented" functions. Replace all the subroutines that croak() with a data structure and 8 lines in POSIX::AUTOLOAD(). [By Aristotle Pagaltzis, with some editing by the committer, and most of his message changes applied as a previous commit to split apart improvements from pure refactoring] This commit eliminates the helper functions POSIX::refef() and POSIX::unimpl(), which were not part of the documented API, not exported, and not used in any code outside the core (that is visible to Google codesearch). M ext/POSIX/lib/POSIX.pm M ext/POSIX/lib/POSIX.pod commit 3d3f7f1a892b71987523a18052d244d41adfd3b1 Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 14:32:47 2011 +0200 The more regular POSIX "unimplemented" diagnostics simplify the tests. M ext/POSIX/t/unimplemented.t commit 0feb969902f50335e681735ffacfc480f3c63e9c Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 13:08:49 2011 +0200 Improvements to the diagnostics for "unimplemented" POSIX functions. Suggested by Aristotle Pagaltzis as part of a larger refactoring. This regularises the text, changing '--use' and ': use' to ', use' to be consistent, provides a message for POSIX::srand(), and adds ' is' to the message for POSIX::bsearch(). Most of the diagnostics have been unchanged since perl 5.000. For some, IO::Handle replaced FileHandle in perl5.003_20 (28757baaaeaa3801). div and ldiv's messages were improved to also mention % in 2003 by commit 7a6ca5fd18d88091. M ext/POSIX/lib/POSIX.pm M ext/POSIX/t/unimplemented.t commit d43884f380102c40f00a25f13e158c46a6b270ae Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 12:13:46 2011 +0200 Test the diagnostics for all POSIX::* functions that are "unimplemented". M MANIFEST A ext/POSIX/t/unimplemented.t commit 186ba50afcfbac42fa82fd511c6539db24917aa2 Author: Nicholas Clark <n...@ccl4.org> Date: Wed Aug 31 11:32:17 2011 +0200 In ext/POSIX/t/is.t, make better use of Test::More. cmp_ok() will give better diagnostics than ok(). Using skip_all() is terser, and will give better diagnostics. M ext/POSIX/t/is.t ----------------------------------------------------------------------- -- Perl5 Master Repository