print --usage, --help to stdout not stderr
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / Basic.pm
index 9bb62ba..6b4d40e 100644 (file)
@@ -24,7 +24,7 @@ sub process_argv {
         # just get the configfile arg now; the rest of the args will be
         # fetched later
         my $configfile;
-        my $opt_parser = Getopt::Long::Parser->new( config => [ qw( no_auto_help pass_through ) ] );
+        my $opt_parser = Getopt::Long::Parser->new( config => [ qw( no_auto_help pass_through no_auto_version ) ] );
         $opt_parser->getoptions( "configfile=s" => \$configfile );
 
         if(!defined $configfile) {
@@ -146,7 +146,8 @@ sub _getopt_spec_exception {
 
 sub _getopt_full_usage {
     my ($self, $usage) = @_;
-    $usage->die;
+    print $usage->text;
+    exit 0;
 }
 
 sub _usage_format {