the all-thing | 2010-09-09 18:40:19 -0400 ========================================== Trollop 1.16.2 released ----------------------- Date: May 11, 2010 1:02am Author: William Morgan Labels: trollop, releases URL: http://all-thing.net/trollop-1.16.2-released.txt Trollop 1.16.2 has been out for a while now, but I realized I (heavens!) haven't yet blogged about it. Exciting features include: 1. Scientific notation is now supported for floating-point arguments, thanks to Will Fitzgerald [1]. 2. Hoe dependency dropped. Finally. 3. Some refactoring of the standard exception-handling logic, making it easier to customize Trollop's behavior. For example, check this out: opts = Trollop::with_standard_exception_handling p do p.parse ARGV raise Trollop::HelpNeeded if ARGV.empty? # show help screen end This example shows the help screen if there are no arguments. Previous to 1.16, this was difficult to do, since the standard exception-handling was baked into @Trollop::options@. The help message would automatically be displayed if @-h@ was given, but programmatically invoking it on demand was difficult. So I've refactored the standard exception handling into @with_standard_exception_handling@, and if you want fine-grained control, instead of calling @Trollop::options@, you now have the option to call @Trollop#parse@ from within @with_standard_exception_handling@. You don't really need any of this stuff, of course, unless you're _really_ picky about how your exception-handling works. But hey, that's why I wrote Trollop in the first place.... [1] http://all-thing.net/trollop-1.15-released#650308e03daab2e0532afe1966bbfc4f This delicious text version served up by Whisper .