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