------art_61088_27178231.1135816236587
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Eric

You may want to give CommandLine a try.
From the examples you give, this is how I would write an app:

require 'rubygems'
require 'commandline'

class MyApp < CommandLine::Application
  def initialize
    # Mandatory argument
    option :names => %w(--require -r),
               :opt_description => "Require the LIBRARY "+
                                            "before executing your script",
               :arg_description => "LIBRARY",
               :opt_found => get_arg,
               :opt_not_found => required

    option :names => %w(--inplace -i),
               :arity => [0,1],
               :opt_description => "Edit ARGV files in place",
               :arg_description => "[EXTENSION]",
               :opt_found => get_arg,
  end

  def main
    #put your code here
    p opts
  end
end#class MyApp

I don't know what #on_tail does either.


--
Jim Freeze

------art_61088_27178231.1135816236587--