X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=lib%2FMooseX%2FGetopt.pm;h=89e55b8d6701d6fb6420ce92a71e44700441ac3a;hp=0e23360b71c7e0114798f0d1647a3163308bc124;hb=9287e912cad9928e90e2d0a589350c0332560ffb;hpb=913e7020b5a0f1426f91ce6b82e94ccbd616e1c5 diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 0e23360..89e55b8 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -55,7 +55,7 @@ sub _parse_argv { my ( $parsed_options, $usage ) = eval { local $SIG{__WARN__} = sub { push @err, @_ }; - Getopt::Long::Descriptive::describe_options("usage: %c %o", @$opt_spec) + Getopt::Long::Descriptive::describe_options($class->_usage_format(%params), @$opt_spec) }; die join "", grep { defined } @err, $@ if @err or $@; @@ -77,6 +77,10 @@ sub _parse_argv { ); } +sub _usage_format { + return "usage: %c %o"; +} + sub _gld_spec { my ( $class, %params ) = @_;