X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt.pm;h=f28e46b05c03405d25e2ded2b828d5af83911113;hb=e2dcd71d32b47ac5bcf91b6b61f859164efd37e7;hp=85747e540c72768f4f5f27a313b3418145bd4415;hpb=630657d529277b7fb600febf001d8667d8e85184;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 85747e5..f28e46b 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -11,7 +11,7 @@ use Carp (); use Getopt::Long (); # GLD uses it anyway, doesn't hurt use constant HAVE_GLD => not not eval { require Getopt::Long::Descriptive }; -our $VERSION = '0.14'; +our $VERSION = '0.16'; our $AUTHORITY = 'cpan:STEVAN'; has ARGV => (is => 'rw', isa => 'ArrayRef', metaclass => "NoGetopt"); @@ -164,7 +164,7 @@ sub _compute_getopt_attrs { $_->name !~ /^_/ } grep { !$_->does('MooseX::Getopt::Meta::Attribute::Trait::NoGetopt') - } $class->meta->compute_all_applicable_attributes + } $class->meta->get_all_attributes } sub _get_cmd_flags_for_attr { @@ -194,9 +194,9 @@ sub _attrs_to_options { my $opt_string = join(q{|}, $flag, @aliases); if ($attr->has_type_constraint) { - my $type_name = $attr->type_constraint->name; - if (MooseX::Getopt::OptionTypeMap->has_option_type($type_name)) { - $opt_string .= MooseX::Getopt::OptionTypeMap->get_option_type($type_name) + my $type = $attr->type_constraint; + if (MooseX::Getopt::OptionTypeMap->has_option_type($type)) { + $opt_string .= MooseX::Getopt::OptionTypeMap->get_option_type($type) } }