I got my Moose commit bit today. I added some docs on how to use
MooseX::Getopt. I'd like to add more but first I have to ask if the
things I want to document are sane, and there are some things I don't
know how to do yet.

Here are some things I've wanted to do which I haven't found in the
documentation:

 * Add modify the default --help output

I overrode _getopt_full_usage in my application to do this, see the
code here:
http://github.com/hinrik/hailo/blob/master/lib/Hailo.pm#L209

However I can't get this to work in the case where I supply an invalid
option, e.g. --this-does-not-exist, then I just get the default
output. There's a bug for this for my application here:
http://github.com/hinrik/hailo/issues#issue/12

 * Make 'foo' equivalent to 'foo --help'

I did this simply by doing:

    @ARGV = qw(--help) unless @ARGV;
    Hailo->new_with_options->run;

It works, but is this a sane way to do it? I.e. something we want to
document for users?

 * has help => ( ... )

How does this work? Putting it in my program magically gives me --help
but greping the source I can't find out why. Commit
47a89a8dec3d21759af9d3e9fbf06149a2870543 added support for --?,
--usage and --help but setting a help attribute only gives me the
latter.

Reply via email to