Is there a way to utilize Getoptlong on an arbitrary command var, ie.
not on ARGV. I figure I can alway do something like:

  require 'getoptlong'

  my_argv = Shellwords.shellwords( "foo -x" )

  const_set(:ARGV,  my_argv)

  opts = GetoptLong.new(
    [ '-x', GetoptLong::NO_ARGUMENT ]
  )

But it just doesn't seem proper to reset ARGV.

Thanks,
T.