Commit | Line | Data |
f3615693 |
1 | package MooseX::Getopt::ProcessedArgv; |
2 | use Moose; |
c4ffa938 |
3 | # ABSTRACT: MooseX::Getopt::ProcessedArgv - Class containing the results of process_argv |
f3615693 |
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 | |
db2a6470 |
11 | no Moose; |
12 | |
f3615693 |
13 | __PACKAGE__->meta->make_immutable(); |
14 | |
15 | 1; |
16 | |
f3615693 |
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 | |
e8e1e4b3 |
34 | =method argv_copy |
f3615693 |
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 | |
e8e1e4b3 |
39 | =method extra_arg |
f3615693 |
40 | |
41 | Arrayref of leftover C<@ARGV> elements that L<Getopt::Long> did not parse. |
42 | |
e8e1e4b3 |
43 | =method usage |
f3615693 |
44 | |
45 | Contains the L<Getopt::Long::Descriptive::Usage> object (if |
46 | L<Getopt::Long::Descriptive> is used). |
47 | |
e8e1e4b3 |
48 | =method constructor_params |
f3615693 |
49 | |
50 | Parameters passed to process_argv. |
51 | |
e8e1e4b3 |
52 | =method cli_param |
f3615693 |
53 | |
54 | Command-line parameters parsed out of C<@ARGV>. |
55 | |
f3615693 |
56 | =cut |