- Getopt parser is pluggined.
(dexter)
+ * MooseX::Getopt::Parser::Descriptive
+ - Getopt::Long::Descriptive::Usage object is available via
+ MooseX::Getopt::Session->parser->usage rather than passed via
+ new_with_options( usage => $usage ) constructor. (dexter)
+
0.15 Sat. July 26 2008
* MooseX::Getopt::OptionTypeMap
- Accept type constraint objects in the type mapping, not just names
default => 'usage: %c %o',
);
+# Usage object
+has usage => (
+ is => 'rw',
+ isa => 'Maybe[Getopt::Long::Descriptive::Usage]',
+ predicate => 'has_usage',
+);
+
sub build_options {
my $self = shift;
$getopt->extra_argv( $extra_argv );
};
+ # Store usage object
+ $self->usage( $usage );
+
# Convert cmd_flags back to names in options hashref
$new_options = { map { $cmd_flags_to_names{$_} => $new_options->{$_} } keys %$new_options };
- # Include old options and usage object
- $new_options = { usage => $usage, %$options, %$new_options };
+ # Include old options
+ $new_options = { %$options, %$new_options };
$getopt->status( ! $warnings );
$getopt->options( $new_options );