Revision history for Perl extension MooseX-Getopt
-0.03
- * downgraded the Getopt version requirement
+0.03 Wed. May 2nd, 2007
+ ~ downgraded the Getopt version requirement
to 2.35 as per RT #26844
+ ~ adding blblack to the authors list
+ * MooseX::Getopt
+ - doc update to show simple way to of excluding
+ an attribute, but not having accessors with
+ underscores (thanks to Zaba on #moose for this)
+ * MooseX::Getopt::Meta::Attribute
+ - tightening up the type constraint in the
+ cmd_alias coercion to only accept strings
0.02 Friday, April 6, 2007
* MooseX::Getopt
By default, attributes which start with an underscore are not given
commandline argument support, unless the attribute's metaclass is set
-to L<MooseX::Getopt::Meta::Attribute>.
+to L<MooseX::Getopt::Meta::Attribute>. If you don't want you accessors
+to have the leading underscore in thier name, you can do this:
+
+ # for read/write attributes
+ has '_foo' => (accessor => 'foo', ...);
+
+ # or for read-only attributes
+ has '_bar' => (reader => 'bar', ...);
+
+This will mean that Getopt will not handle a --foo param, but your
+code can still call the C<foo> method.
=head2 Supported Type Constraints
-package MooseX::Getopt::Meta::Attribute;
+package ;
use Moose;
use Moose::Util::TypeConstraints;
# without polluting the built-in types
subtype '_MooseX_Getopt_CmdAliases'
=> as 'ArrayRef'
- => where { 1 };
+ => where { 1 };
+
coerce '_MooseX_Getopt_CmdAliases'
- => from 'Value'
+ => from 'Str'
=> via { [$_] };
has 'cmd_aliases' => (
Stevan Little E<lt>stevan@iinteractive.comE<gt>
+Brandon L. Black, E<lt>blblack@gmail.comE<gt>
+
=head1 COPYRIGHT AND LICENSE
Copyright 2007 by Infinity Interactive, Inc.