From: Tomas Doran (t0m Date: Mon, 6 Jul 2009 00:21:39 +0000 (+0100) Subject: Fix Getopt config spec X-Git-Tag: 0_19~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4308031a6f638c55439e3071af124f79eacd2ca;p=gitmo%2FMooseX-Getopt.git Fix Getopt config spec --- diff --git a/ChangeLog b/ChangeLog index 2dcf4f1..7ca539c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Revision history for Perl extension MooseX-Getopt + * MooseX::Getopt + - Fix Getopt config spec for --configfile (t0m) + * Tests - Fix warning from tests with new Moose (t0m) - Fix tests on Win32 from RT#44909 (taro-nishino) diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 790eb54..74b8be0 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -193,7 +193,10 @@ sub _attrs_to_options { my $opt_string = join(q{|}, $flag, @aliases); - if ($attr->has_type_constraint) { + if ($attr->name eq 'configfile') { + $opt_string .= '=s'; + } + elsif ($attr->has_type_constraint) { my $type = $attr->type_constraint; if (MooseX::Getopt::OptionTypeMap->has_option_type($type)) { $opt_string .= MooseX::Getopt::OptionTypeMap->get_option_type($type)