Version 0.27.
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt.pm
index d8b5d2b..e8b6812 100644 (file)
@@ -1,16 +1,12 @@
-
 package MooseX::Getopt;
 use Moose::Role;
 
-our $VERSION   = '0.20';
-our $AUTHORITY = 'cpan:STEVAN';
-
-use constant HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
+use constant _HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
 
-my @roles = ('MooseX::Getopt::Basic');
-if (HAVE_GLD()) { push @roles, 'MooseX::Getopt::GLD' }
+our $VERSION   = '0.27';
+our $AUTHORITY = 'cpan:STEVAN';
 
-with @roles;
+with _HAVE_GLD ? 'MooseX::Getopt::GLD' : 'MooseX::Getopt::Basic';
 
 no Moose::Role; 1;
 
@@ -67,8 +63,8 @@ to have C<MooseX::Getopt> ignore your attribute in the commandline options.
 
 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>. If you don't want you accessors
-to have the leading underscore in thier name, you can do this:
+to L<MooseX::Getopt::Meta::Attribute>. If you don't want your accessors
+to have the leading underscore in their name, you can do this:
 
   # for read/write attributes
   has '_foo' => (accessor => 'foo', ...);
@@ -205,7 +201,7 @@ This method will take a set of default C<%params> and then collect
 params from the command line (possibly overriding those in C<%params>)
 and then return a newly constructed object.
 
-The special parameter C<argv>, if specified should point to an array  
+The special parameter C<argv>, if specified should point to an array
 reference with an array to use instead of C<@ARGV>.
 
 If L<Getopt::Long/GetOptions> fails (due to invalid arguments),
@@ -220,7 +216,7 @@ B<documentation> option for each attribute to document.
   --help
   --usage
 
-If you have L<Getopt::Long::Descriptive> a the C<usage> param is also passed to
+If you have L<Getopt::Long::Descriptive> the C<usage> param is also passed to
 C<new>.
 
 =item B<ARGV>
@@ -238,10 +234,6 @@ un-mangled.
 
 This returns the role meta object.
 
-=item B<HAVE_GLD>
-
-A constant for internal use.
-
 =back
 
 =head1 BUGS
@@ -264,6 +256,8 @@ Ryan D Johnson, E<lt>ryan@innerfence.comE<gt>
 
 Drew Taylor, E<lt>drew@drewtaylor.comE<gt>
 
+Tomas Doran, (t0m) C<< <bobtfish@bobtfish.net> >>
+
 =head1 COPYRIGHT AND LICENSE
 
 Copyright 2007-2008 by Infinity Interactive, Inc.