[Rake-devel] [discussion] non-destructive option parsing

Edwin Pratomo edpratomo at yahoo.co.id
Sun May 11 05:14:40 EDT 2008


good day jim and all

currently rake uses getoptlong to parse command line options. the problem with
this is that getoptlong destructively consumes ARGV, which means checking ARGV
in a rakefile won't find any previously passed options. 

why would we need to check ARGV in rakefile? one possible case is to make use
of rake's options such as -q or -v. so users might pass -qq or -vvv and a
rakefile will print as much (or as little) output as those options are given.

so i'd suggest to use optparse instead, as optparse supports non-destructive
parsing. 

rgds,
Edwin.




      
________________________________________________________ 
Kunjungi halaman depan Yahoo! Indonesia yang baru! 
http://id.yahoo.com/


More information about the Rake-devel mailing list