I’ve released Trollop 1.13. This is a minor bugfix release. Arguments
given with =’s and with spaces in the values are now parsed correctly.
(E.g. --name="your mom".)
Get it with a quick gem install trollop.
I’ve released Trollop 1.13. This is a minor bugfix release. Arguments
given with =’s and with spaces in the values are now parsed correctly.
(E.g. --name="your mom".)
Get it with a quick gem install trollop.
To reply to the article, enter your email address. A copy of the article will be sent to you via email.
Hi William, I am actually writing about an image that I found on Flickr. I’m a designer working on a season brochure for the American Repertory Theater in Cambridge. One of next year’s productions is called Red Sox Nation, and the artistic director saw your image and loves it. Would you consider letting us use it in the brochure and on the website? And if so, do you have a hi- resolution version? We would be willing to offer a small stipend (they’re non-profit, so money is tight).
Please let me know. Thanks, Trish Leavitt
posting depending on quoted. settings. fine). I’ve released Trollop 1.13. This is a minor bugfix release. Arguments given with =’s and with spaces in the values are now parsed correctly. (E.g.
--name="your mom".) Get it with a quickgem install trollop.Hey William – I just got started using Trollop today, and I love it. I did come across a very strange use-case though that caused some problems. I’m writing a program that has subcommands, and allows the user to create new Commands with a rakefile-style file, which was creating objects with an ivar @options. When I used that object’s @options in a Trollop::options block, all hell broke loose. I’m assuming you use @options in the Parser object? Anyway, I fixed it up really easily, but I thought I’d pass it along.
When I used that object’s @options in a Trollop::options block, all hell broke loose. I’m assuming you use @options in the Parser object?
Yeah, everything in the
optionsblock is evaluated in the context of the Parser object. The benefit is that you could just calloptwithin that block without having to sayparser.opteach time. The downside is the behavior you describe. Luckily I think what you’re doing is quite rare, and easy enough to get around.