* MooseX::Getopt::Parser::* set status to true value if there is no warnings.
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / Parser / Descriptive.pm
index c212eb1..ff05c8f 100644 (file)
@@ -5,9 +5,10 @@ use Moose;
 
 with 'MooseX::Getopt::Parser';
 
-use Getopt::Long::Descriptive;
 use MooseX::Getopt::OptionTypeMap;
 
+use Getopt::Long::Descriptive ();
+
 
 # Special configuration for parser
 has config => (
@@ -94,6 +95,7 @@ sub build_options {
     # Include old options and usage object
     $new_options = { usage => $usage, %$options, %$new_options };
 
+    $getopt->status( ! $warnings );
     $getopt->options( $new_options );
 
     die $warnings if $warnings;