X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt.pm;h=3e28e4564456ba37bc061922f51a5d320ac10f16;hb=07d7ec054e914c2687455ff823410104605689c1;hp=5c72fcdf2c848ed1244160451ba4efeb860b21a8;hpb=89543df300c7060f7b90c8a5e322271884c87da1;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 5c72fcd..3e28e45 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -67,7 +67,7 @@ sub new_with_options { # did the user request usage information? if ( $processed{usage} && ($params->{'?'} or $params->{help} or $params->{usage}) ) { - $processed{usage}->die(); + $class->_getopt_full_usage($processed{usage}); } $class->new( @@ -128,6 +128,11 @@ sub _getopt_spec_exception { die @$warnings, $exception; } +sub _getopt_full_usage { + my ($self, $usage) = @_; + $usage->die; +} + sub _usage_format { return "usage: %c %o"; }