[ditz-talk] Some work on ditz
wmorgan-ditz at masanjin.net
Wed Jul 30 18:03:29 EDT 2008
Reformatted excerpts from Ohad Lutzky's message of 2008-07-30:
> Well, config is currently a custom object (why, by the way?), whereas
> trollop just gives us a hash. It would be possible to merge them,
> manually adding fields for anything we need, but I'm not sure what
> we'd gain.
Whoops, I meant $opts and opts, not config and opts. Do away with the
global, and have one hash that contains global and subcommand options.
Config can stay as it is. (It's a ModelObject because that allows us to
interactively create it when needs be.)
> This would work if trollop weren't hardwired to work with ARGV.
> However, currently Trollop's "options" sends all of his parameters on
> to Trollop::Parser.initialize, which in turn passes them to cloaker,
> and I have no idea what that does :)
I think that for subcommand arguments, we want to construct a
Trollop::Parser of our own anyways, since we probably want to handle
things like HelpNeeded and VersionNeeded specially. Not sure.
I kinda forget where I was going with the parameters to
Trollop::options. Doesn't look like they're used. If that's really true,
it could just take a single argument that defaults to ARGV instead.
William <wmorgan-ditz at masanjin.net>
More information about the ditz-talk