* MooseX::Getopt::Parser::*: fix regression: support attributes without type.
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / Parser / Descriptive.pm
index 4688df6..3e71d34 100644 (file)
@@ -46,7 +46,7 @@ sub build_options {
        $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;