From: Tomas Doran Date: Fri, 3 Feb 2012 14:12:58 +0000 (+0000) Subject: Fix pointed out by Gaal Yahas in irc X-Git-Tag: 0.39~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a8392d6d13ea53d57ef83cf36fb48633e8c759f;p=gitmo%2FMooseX-Getopt.git Fix pointed out by Gaal Yahas in irc --- diff --git a/ChangeLog b/ChangeLog index 058caf7..c717ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Revision history for Perl extension MooseX-Getopt + * Fix argument parseing in process_argv when used with ConfigFromFile so that + -v can be used as expected, rather than being grabbed as --version + 0.38 Fri 23 Dec 2011 * More documentation on Getopt::Long settings and how they alter this role's behaviour, in particular with regards to extra_argv capturing. diff --git a/lib/MooseX/Getopt/Basic.pm b/lib/MooseX/Getopt/Basic.pm index 9bb62ba..87b54db 100644 --- a/lib/MooseX/Getopt/Basic.pm +++ b/lib/MooseX/Getopt/Basic.pm @@ -24,7 +24,7 @@ sub process_argv { # just get the configfile arg now; the rest of the args will be # fetched later my $configfile; - my $opt_parser = Getopt::Long::Parser->new( config => [ qw( no_auto_help pass_through ) ] ); + my $opt_parser = Getopt::Long::Parser->new( config => [ qw( no_auto_help pass_through no_auto_version ) ] ); $opt_parser->getoptions( "configfile=s" => \$configfile ); if(!defined $configfile) {