projects
/
gitmo/MooseX-Getopt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
* MooseX::Getopt::Session: New attribute "status".
[gitmo/MooseX-Getopt.git]
/
lib
/
MooseX
/
Getopt.pm
diff --git
a/lib/MooseX/Getopt.pm
b/lib/MooseX/Getopt.pm
index
8d0acd3
..
8eda924
100644
(file)
--- a/
lib/MooseX/Getopt.pm
+++ b/
lib/MooseX/Getopt.pm
@@
-52,6
+52,9
@@
sub get_options_from_argv {
options => $options,
);
+ # Call Getopt parser only once.
+ $getopt->build_options if not $getopt->has_status;
+
my $new_options = {
%{ $options }, # explicit options to ->new
%{ $getopt->options }, # options from CLI