X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FParser%2FLong.pm;fp=lib%2FMooseX%2FGetopt%2FParser%2FLong.pm;h=e7c582853021f827bd6d2eeb3f4c229405fff697;hb=05e8fe8973c9305d2a81ee513474cd5f78a0fef3;hp=12f65655ef81d1105199bc436dda4814ca844a73;hpb=053fa19e136de81f8144bd403b5da17c2dbd0c01;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/Parser/Long.pm b/lib/MooseX/Getopt/Parser/Long.pm index 12f6565..e7c5828 100644 --- a/lib/MooseX/Getopt/Parser/Long.pm +++ b/lib/MooseX/Getopt/Parser/Long.pm @@ -36,7 +36,7 @@ sub build_options { my $type = $getopt->_get_cmd_type_for_attr($attr); my $opt_string = join '|', $flag, @aliases; - $opt_string .= MooseX::Getopt::OptionTypeMap->get_option_type($type); + $opt_string .= MooseX::Getopt::OptionTypeMap->get_option_type($type) if $type; $options{$name} = undef; push @opts, $opt_string => \$options{$name}; @@ -53,9 +53,7 @@ sub build_options { local $SIG{__WARN__} = sub { return warn @_ if $_[0]=~/^\###/; # Smart::Comments - my $warning = $getopt->has_warning ? $getopt->warning : ''; - $warning .= $_[0]; - $getopt->warning( $warning ) + $getopt->strcat_warning( $_[0] ) }; my $status = $parser->getoptions( @opts );