From: Piotr Roszatycki Date: Mon, 24 Nov 2008 21:35:01 +0000 (+0000) Subject: * MooseX::Getopt::Parser::* set status to true value if there is no warnings. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=41dd8ab334a211da41754a36bd2896ef54fd7554;p=gitmo%2FMooseX-Getopt.git * MooseX::Getopt::Parser::* set status to true value if there is no warnings. --- diff --git a/lib/MooseX/Getopt/Parser/Descriptive.pm b/lib/MooseX/Getopt/Parser/Descriptive.pm index 57ecaea..ff05c8f 100644 --- a/lib/MooseX/Getopt/Parser/Descriptive.pm +++ b/lib/MooseX/Getopt/Parser/Descriptive.pm @@ -95,7 +95,7 @@ sub build_options { # Include old options and usage object $new_options = { usage => $usage, %$options, %$new_options }; - $getopt->status( !! $warnings ); + $getopt->status( ! $warnings ); $getopt->options( $new_options ); die $warnings if $warnings; diff --git a/lib/MooseX/Getopt/Parser/Long.pm b/lib/MooseX/Getopt/Parser/Long.pm index 3a1eb2d..2914824 100644 --- a/lib/MooseX/Getopt/Parser/Long.pm +++ b/lib/MooseX/Getopt/Parser/Long.pm @@ -66,7 +66,7 @@ sub build_options { # Filter not defined values in new_options hashref $new_options = { map { $_ => $new_options->{$_} } grep { defined $new_options->{$_} } keys %$new_options }; - $getopt->status( !! $warnings ); + $getopt->status( ! $warnings ); $getopt->options( $new_options ); die $warnings if $warnings;