From: Yuval Kogman Date: Mon, 21 Jan 2008 17:54:00 +0000 (+0000) Subject: _usage_format method X-Git-Tag: 0_09~1^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=commitdiff_plain;h=9287e912cad9928e90e2d0a589350c0332560ffb _usage_format method --- 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 ) = @_;