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