From ruby-talk-admin@ruby-lang.org Thu Dec 15 21:32:23 2005 Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (8.12.3/8.12.3/Debian-6.6) with ESMTP id jBFCWMZk017611; Thu, 15 Dec 2005 21:32:22 +0900 Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 877195A05; Thu, 15 Dec 2005 21:32:23 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id CE973F0489C; Thu, 15 Dec 2005 21:32:26 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 7F0D6F0489B; Thu, 15 Dec 2005 21:32:25 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [210.163.138.100]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id C9516630029; Thu, 15 Dec 2005 21:32:27 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id B75F23398B; Thu, 15 Dec 2005 21:32:23 +0900 (JST) Received: from localhost (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id 18EB4339D0 for ; Thu, 15 Dec 2005 21:32:17 +0900 (JST) Received: from beryllium.ruby-lang.org ([127.0.0.1]) by localhost (beryllium.ruby-lang.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17096-08 for ; Thu, 15 Dec 2005 21:32:16 +0900 (JST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.192]) by beryllium.ruby-lang.org (Postfix) with ESMTP id 797603398B for ; Thu, 15 Dec 2005 21:32:16 +0900 (JST) Received: by xproxy.gmail.com with SMTP id t4so256464wxc for ; Thu, 15 Dec 2005 04:32:11 -0800 (PST) Received: by 10.70.132.1 with SMTP id f1mr2431079wxd; Thu, 15 Dec 2005 04:32:09 -0800 (PST) Received: by 10.70.34.12 with HTTP; Thu, 15 Dec 2005 04:32:08 -0800 (PST) Delivered-To: ruby-talk@ruby-lang.org Date: Thu, 15 Dec 2005 21:32:17 +0900 Posted: Thu, 15 Dec 2005 06:32:09 -0600 From: Jim Freeze Reply-To: ruby-talk@ruby-lang.org Subject: Re: GetoptLong example Sender: jimfreeze@gmail.com To: ruby-talk@ruby-lang.org (ruby-talk ML) Message-Id: <5cd596d60512150432y74e311c8pf90399b429a443e2@mail.gmail.com> In-Reply-To: References: <200512141939.34072.slitt@earthlink.net> X-ML-Name: ruby-talk X-Mail-Count: 19 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-talk-ctl@ruby-lang.org; help= X-Original-To: ruby-talk@ruby-lang.org DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sZe8V+vbmNeA3aBEevg+Si4Z0inlF7YR17/xK53OcHo2zrEhGh3IgzWvNfRh90RMtMQqczlDblIzCn+rcMghTA3+Z2H7wU+NgfzhW8w9Tar7XbACh+26MjdaA7QSD28oVeB8lfn0N/Rsag1h82npG/R+vNobNumHBqbEzEtvX9c= Content-Disposition: inline X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ruby-lang.org X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on beryllium.ruby-lang.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=7.0 tests=AWL,BAYES_00, CONTENT_TYPE_PRESENT,MIMEQENC,QENCPTR2,RCVDFRMLOCALIP,RCVD_BY_IP autolearn=no version=3.0.3 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Precedence: bulk Lines: 22 List-Id: ruby-talk.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: X-Virus-Scanned: by AMaViS snapshot-20020531 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by blade.nagaokaut.ac.jp id jBFCWMZk017611 On 12/14/05, Nick Sieger wrote: > On 12/14/05, Steve Litt wrote: > > Hi all, > > > > Anyone have a short and easy GetoptLong example in Ruby? It's not > > object oriented in Perl or C, so I'm in unfamiliar territory. Have you tried OptionParser? It is fully OO and integrated with Application. Yes, that was the sound of my own horn. :) I know CommandLine cannot solve everyones needs, but I would be interested to hear about it if it doesn't meet your needs. Maybe there is something I can change or add to the library. My nefarious global take over plans are to see CommandLine - which has a Ruby flavor - be put in the stdlib and surplant the existing optparse and getoptlong parsers which use aging methodologies. -- Jim Freeze