default => sub { {} },
);
-
-sub BUILD {
- my ($self, $args) = @_;
-
- $self->build_options;
-};
+# Status returned by Getopt parser
+has status => (
+ is => 'rw',
+ isa => 'Bool',
+ predicate => 'has_status',
+);
sub build_options {
=item B<new (%params)>
-This method creates new CLI session for L<MooseX::Getopt> and calls
-C<build_options> method.
+This method creates new CLI session object for L<MooseX::Getopt>. The
+session should be started with C<build_options> method.
=item B<build_options>
L<MooseX::Getopt::Parser>. If the options list are not empty before parsing
the command line, the old list will be included to new list.
-=item B<BUILD>
+=item B<status>
-This is a default L<Moose> constructor.
+This accessor contains a true value if L<MooseX::Getopt::Parser> was
+called via C<build_options> method and it succeeded.
=item B<meta>