Trollop news

Looks like there was a Ruby Inside article featuring Trollop a few weeks ago. Partially as a result of this, I have at least two other people contributing patches. For a project that's been around for a few years and basically had no one but me use it, that's a nice change of pace.

I've also moved it over from SVN to git (hosted on Gitorious), which probably will help some.

3 comments:

Peter Cooper said...

That's awesome news! I think I saw Trollop when you posted a little update to ruby-talk a month or two ago, so unless you want to get in touch with me specifically, that's a great way of getting the news out.

Brendan said...

I still use Trollop a lot but have never felt the need to patch it. Well, one issue: if you have lots and lots of flags, the guessing system to generate a short name will make conflicts and error out. But the workaround is very easy (manually specify all shortnames).

I tried extending cgi.rb with Trollop's option type specification and parsing system, since it's a similar problem -- options are passed over a string-only channel (values of the query string). the hack is here http://gist.github.com/5682

William said...

"Well, one issue: if you have lots and lots of flags, the guessing system to generate a short name will make conflicts and error out. But the workaround is very easy (manually specify all shortnames)."

In June I fixed a problem where it was trying to pick dashes out of long argument names for the one-char name, and then dying because that was invalid. I think that was the biggest source of errors related to this.

The larger problem of death by running out of characters for short options is, I think, ok. Once the option list grows beyond a certain size, you should be specifying your own short options, because otherwise it's just a matter of time before you add one more option and every automatically-picked short option changes. Then your users get unhappy.

Blog Archive