Files | Admin

Notes:

Release Name: 1.8.1

Notes:
%3D%3D+DESCRIPTION%0A%0ATrollop+is+a+commandline+option+parser+for+Ruby+that+just+gets+out+of+your%0Away.+One+line+of+code+per+option+is+all+you+need+to+write.+For+that%2C+you+get%0Aa+nice+automatically-generated+help+page%2C+robust+option+parsing%2C+command%0Asubcompletion%2C+and+sensible+defaults+for+everything+you+don't+specify.%0A%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A++%23%23%23%23%23%23+simple+%23%23%23%23%23%23%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%0A++require+'trollop'%0A++opts+%3D+Trollop%3A%3Aoptions+do%0A++++opt+%3Amonkey%2C+%22Use+monkey+mode%22%0A++++opt+%3Agoat%2C+%22Use+goat+mode%22%2C+%3Adefault+%3D%3E+true%0A++++opt+%3Anum_limbs%2C+%22Set+number+of+limbs%22%2C+%3Adefault+%3D%3E+4%0A++end%0A%0A++p+opts+%23+%7B+%3Amonkey+%3D%3E+false%2C+%3Agoat+%3D%3E+true%2C+%3Anum_limbs+%3D%3E+4+%7D%0A%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A++%23%23%23%23%23%23+medium+%23%23%23%23%23%23%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%0A++require+'trollop'%0A++opts+%3D+Trollop%3A%3Aoptions+do%0A++++version+%22test+1.2.3+(c)+2007+William+Morgan%22%0A++++banner+%3C%3C-EOS%0A++Test+is+an+awesome+program+that+does+something+very%2C+very+important.%0A%0A++Usage%3A%0A+++++++++test+%5Boptions%5D+%3Cfilenames%3E%2B%0A++where+%5Boptions%5D+are%3A%0A++EOS%0A%0A++++opt+%3Aignore%2C+%22Ignore+incorrect+values%22%0A++++opt+%3Afile%2C+%22Extra+data+filename+to+read+in%2C+with+a+very+long+option+description+like+this+one%22%2C+%3Atype+%3D%3E+String%0A++++opt+%3Avolume%2C+%22Volume+level%22%2C+%3Adefault+%3D%3E+3.0%0A++++opt+%3Aiters%2C+%22Number+of+iterations%22%2C+%3Adefault+%3D%3E+5%0A++end%0A++Trollop%3A%3Adie+%3Avolume%2C+%22must+be+non-negative%22+if+opts%5B%3Avolume%5D+%3C+0%0A++Trollop%3A%3Adie+%3Afile%2C+%22must+exist%22+unless+File.exist%3F(opts%5B%3Afile%5D)+if+opts%5B%3Afile%5D%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A++%23%23%23%23%23+sub-command+support+%23%23%23%23%23%23%0A++%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%0A++require+'trollop'%0A++global_opts+%3D+Trollop%3A%3Aoptions+do%0A++++opt+%3Aglobal_option%2C+%22This+is+a+global+option%22%0A++++stop_on+%25w(sub-command-1+sub-command-2)%0A++end%0A%0A++cmd+%3D+ARGV.shift%0A++cmd_opts+%3D+Trollop%3A%3Aoptions+do%0A++++opt+%3Acmd_option%2C+%22This+is+an+option+only+for+the+subcommand%22%0A++end%0A%0A++p+global_opts%0A++p+cmd%0A++p+cmd_opts


Changes: %3D%3D+1.8.1+%2F+2008-06-24