X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FMeta%2FAttribute.pm;h=22e41915f41b7f250ea72e2e26257b90f82e9a05;hb=6ac028c4d869259041b7c526071cf614ffb033fa;hp=5f29df1f8add9d70a4f56a14c8d13dda0c809bd1;hpb=1a8b4ed19c6096c389d094504e81b524d7af7120;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/Meta/Attribute.pm b/lib/MooseX/Getopt/Meta/Attribute.pm index 5f29df1..22e4191 100644 --- a/lib/MooseX/Getopt/Meta/Attribute.pm +++ b/lib/MooseX/Getopt/Meta/Attribute.pm @@ -3,7 +3,7 @@ package MooseX::Getopt::Meta::Attribute; use Moose; use Moose::Util::TypeConstraints; -our $VERSION = '0.02'; +our $VERSION = '0.04'; our $AUTHORITY = 'cpan:STEVAN'; extends 'Moose::Meta::Attribute'; # << Moose extending Moose :) @@ -16,11 +16,10 @@ has 'cmd_flag' => ( # This subtype is to support scalar -> arrayref coercion # without polluting the built-in types -subtype '_MooseX_Getopt_CmdAliases' - => as 'ArrayRef' - => where { 1 }; +subtype '_MooseX_Getopt_CmdAliases' => as 'ArrayRef'; + coerce '_MooseX_Getopt_CmdAliases' - => from 'Value' + => from 'Str' => via { [$_] }; has 'cmd_aliases' => ( @@ -33,7 +32,8 @@ has 'cmd_aliases' => ( no Moose; # register this as a metaclass alias ... -package Moose::Meta::Attribute::Custom::Getopt; +package # stop confusing PAUSE + Moose::Meta::Attribute::Custom::Getopt; sub register_implementation { 'MooseX::Getopt::Meta::Attribute' } 1; @@ -125,6 +125,8 @@ to cpan-RT. Stevan Little Estevan@iinteractive.comE +Brandon L. Black, Eblblack@gmail.comE + =head1 COPYRIGHT AND LICENSE Copyright 2007 by Infinity Interactive, Inc.