chain _getopt_full_usage in the other direction, to unbreak modules that override...
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / ProcessedArgv.pm
1 package MooseX::Getopt::ProcessedArgv;
2 use Moose;
3 # ABSTRACT: MooseX::Getopt::ProcessedArgv - Class containing the results of process_argv
4
5 has 'argv_copy'          => (is => 'ro', isa => 'ArrayRef');
6 has 'extra_argv'         => (is => 'ro', isa => 'ArrayRef');
7 has 'usage'              => (is => 'ro', isa => 'Maybe[Object]');
8 has 'constructor_params' => (is => 'ro', isa => 'HashRef');
9 has 'cli_params'         => (is => 'ro', isa => 'HashRef');
10
11 no Moose;
12
13 __PACKAGE__->meta->make_immutable();
14
15 1;
16
17 =head1 SYNOPSIS
18
19   use My::App;
20
21   my $pa = My::App->process_argv(@params);
22   my $argv_copy          = $pa->argv_copy();
23   my $extra_argv         = $pa->extra_argv();
24   my $usage              = $pa->usage();
25   my $constructor_params = $pa->constructor_params();
26   my $cli_params         = $pa->cli_params();
27
28 =head1 DESCRIPTION
29
30 This object contains the result of a L<MooseX::Getopt/process_argv> call. It
31 contains all the information that L<MooseX::Getopt/new_with_options> uses
32 when calling new.
33
34 =method argv_copy
35
36 Reference to a copy of the original C<@ARGV> array as it originally existed
37 at the time of C<new_with_options>.
38
39 =method extra_arg
40
41 Arrayref of leftover C<@ARGV> elements that L<Getopt::Long> did not parse.
42
43 =method usage
44
45 Contains the L<Getopt::Long::Descriptive::Usage> object (if
46 L<Getopt::Long::Descriptive> is used).
47
48 =method constructor_params
49
50 Parameters passed to process_argv.
51
52 =method cli_param
53
54 Command-line parameters parsed out of C<@ARGV>.
55
56 =cut