$cmd_flags_to_names{$flag} = $name;
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;
my $doc;
$doc = $attr->documentation if $attr->has_documentation;
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};
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 );