module_name => 'MooseX::Getopt',
license => 'perl',
requires => {
- 'Moose' => '0.17',
+ 'Moose' => '0.19',
'Getopt::Long' => '2.36',
},
optional => {
Revision history for Perl extension MooseX-Getopt
+0.02
+
+ * MooseX::Getopt
+ - added the ARGV attribute (thanks to blblack)
+ - added tests and docs for this
+
+ * MooseX::Getopt::Meta::Attribute
+ - added the cmd_aliases attribute (thanks to blblack)
+ - added tests and docs for this
+ - added support for Moose 0.19's custom
+ attribute metaclass alias registry.
+ - added tests and docs for this
+
0.01 Friday, March 9, 2007
- module released to CPAN
\ No newline at end of file
-MooseX::Getopt version 0.01
+MooseX::Getopt version 0.02
===========================
See the individual module documentation for more information
use MooseX::Getopt::OptionTypeMap;
use MooseX::Getopt::Meta::Attribute;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
our $AUTHORITY = 'cpan:STEVAN';
has ARGV => (is => 'rw', isa => 'ArrayRef');
use Moose;
use Moose::Util::TypeConstraints;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
our $AUTHORITY = 'cpan:STEVAN';
extends 'Moose::Meta::Attribute'; # << Moose extending Moose :)
coerce => 1,
);
-no Moose; 1;
+no Moose;
-__END__
+# register this as a metaclass alias ...
+package Moose::Meta::Attribute::Custom::Getopt;
+sub register_implementation { 'MooseX::Getopt::Meta::Attribute' }
+
+1;
+__END__
=pod
with 'MooseX::Getopt';
has 'data' => (
- metaclass => 'MooseX::Getopt::Meta::Attribute',
+ metaclass => 'MooseX::Getopt::Meta::Attribute',
is => 'ro',
isa => 'Str',
default => 'file.dat',
This is certainly not the prettiest way to go about this, but for
now it works for those who might need such a feature.
+=head2 Custom Metaclass alias
+
+This now takes advantage of the Moose 0.19 feature to support
+custom attribute metaclass aliases. This means you can also
+use this as the B<Getopt> alias, like so:
+
+ has 'foo' => (metaclass => 'Getopt', cmd_flag => 'f');
+
=head1 METHODS
These methods are of little use to most users, they are used interally
);
has 'cow' => (
- metaclass => 'MooseX::Getopt::Meta::Attribute',
+ metaclass => 'Getopt',
is => 'ro',
isa => 'Str',
default => 'moo',