Sha256: d7cfcc3fe62bc5303c7e66db4bcba109d0f46029a2628a8bd8a7bfe03922c96a

Contents?: true

Size: 1.21 KB

Versions: 18

Compression:

Stored size: 1.21 KB

Contents

Trollop FAQ
-----------

Q: Why should I use Trollop?
A: Because it will take you FEWER LINES OF CODE to do reasonable option
   parsing than any other option parser in existence.

   Look:

     opts = Trollop::options do
       opt :monkey, "Use monkey mode"
       opt :goat, "Use goat mode", :default => true
       opt :num_limbs, "Set number of limbs", :default => 4
     end

   That's it. And opts is a hash and you do whatever you want with it.
   Trivial. You don't have to mix option processing code blocks with the
   declarations. You don't have to make a class for every option (what is
   this, Java?). You don't have to write more than 1 line of code per
   option.

Q: Why is it called "Trollop"?
A: No reason.

Q: Why does Trollop disallow numeric short argument names, like '-1'
   and '-9'?
A: Because it's ambiguous whether these are arguments or negative
   integer or floating-point parameters to arguments. E.g., what
   about "-f -3". Is that a negative three parameter to -f, or two
   separate parameters? 

   I could be very clever and detect when there are no arguments
   that require floating-point parameters, and allow such short option
   names in those cases, but opted for simplicity and consistency.

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
auser-poolparty-1.2.10 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.11 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.12 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.3 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.4 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.7 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.8 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.2.9 vendor/gems/trollop/FAQ.txt
auser-poolparty-1.3.0 vendor/gems/trollop/FAQ.txt
fairchild-poolparty-1.2.12 vendor/gems/trollop/FAQ.txt
jashmenn-git-style-binaries-0.1.10 vendor/gems/trollop/FAQ.txt
jashmenn-git-style-binaries-0.1.9 vendor/gems/trollop/FAQ.txt
trollop-1.10 FAQ.txt
trollop-1.10.1 FAQ.txt
trollop-1.12 FAQ.txt
trollop-1.13 FAQ.txt
trollop-1.11 FAQ.txt
trollop-1.10.2 FAQ.txt