Getopt shouldn't require ConfigFromFile role applied at same level
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt.pm
index 582c557..97d59c8 100644 (file)
@@ -9,7 +9,7 @@ use MooseX::Getopt::Meta::Attribute::NoGetopt;
 use Getopt::Long (); # GLD uses it anyway, doesn't hurt
 use constant HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
 
-our $VERSION   = '0.12';
+our $VERSION   = '0.12_01';
 our $AUTHORITY = 'cpan:STEVAN';
 
 has ARGV       => (is => 'rw', isa => 'ArrayRef', metaclass => "NoGetopt");
@@ -27,7 +27,7 @@ sub new_with_options {
         $opt_parser->getoptions( "configfile=s" => \$configfile );
 
         if(!defined $configfile) {
-            my $cfmeta = $class->meta->get_attribute('configfile');
+            my $cfmeta = $class->meta->find_attribute_by_name('configfile');
             $configfile = $cfmeta->default if $cfmeta->has_default;
         }
 
@@ -423,6 +423,10 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 Brandon L. Black, E<lt>blblack@gmail.comE<gt>
 
+=head1 CONTRIBUTORS
+
+Ryan D Johnson, E<lt>ryan@innerfence.comE<gt>
+
 =head1 COPYRIGHT AND LICENSE
 
 Copyright 2007-2008 by Infinity Interactive, Inc.