Clean up namespace
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / ProcessedArgv.pm
CommitLineData
f3615693 1package MooseX::Getopt::ProcessedArgv;
2use Moose;
3
4has 'argv_copy' => (is => 'ro', isa => 'ArrayRef');
5has 'extra_argv' => (is => 'ro', isa => 'ArrayRef');
6has 'usage' => (is => 'ro', isa => 'Maybe[Object]');
7has 'constructor_params' => (is => 'ro', isa => 'HashRef');
8has 'cli_params' => (is => 'ro', isa => 'HashRef');
9
db2a6470 10no Moose;
11
f3615693 12__PACKAGE__->meta->make_immutable();
13
141;
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
29This object contains the result of a L<MooseX::Getopt/process_argv> call. It
30contains all the information that L<MooseX::Getopt/new_with_options> uses
31when calling new.
32
e8e1e4b3 33=method argv_copy
f3615693 34
35Reference to a copy of the original C<@ARGV> array as it originally existed
36at the time of C<new_with_options>.
37
e8e1e4b3 38=method extra_arg
f3615693 39
40Arrayref of leftover C<@ARGV> elements that L<Getopt::Long> did not parse.
41
e8e1e4b3 42=method usage
f3615693 43
44Contains the L<Getopt::Long::Descriptive::Usage> object (if
45L<Getopt::Long::Descriptive> is used).
46
e8e1e4b3 47=method constructor_params
f3615693 48
49Parameters passed to process_argv.
50
e8e1e4b3 51=method cli_param
f3615693 52
53Command-line parameters parsed out of C<@ARGV>.
54
f3615693 55=cut