line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::Getopt::ProcessedArgv; |
2
|
|
|
|
|
|
|
# ABSTRACT: MooseX::Getopt::ProcessedArgv - Class containing the results of process_argv |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.75'; |
5
|
|
|
|
|
|
|
|
6
|
27
|
|
|
27
|
|
197
|
use Moose; |
|
27
|
|
|
|
|
66
|
|
|
27
|
|
|
|
|
199
|
|
7
|
27
|
|
|
27
|
|
176804
|
use namespace::autoclean; |
|
27
|
|
|
|
|
72
|
|
|
27
|
|
|
|
|
310
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'argv_copy' => (is => 'ro', isa => 'ArrayRef'); |
10
|
|
|
|
|
|
|
has 'extra_argv' => (is => 'ro', isa => 'ArrayRef'); |
11
|
|
|
|
|
|
|
has 'usage' => (is => 'ro', isa => 'Maybe[Object]'); |
12
|
|
|
|
|
|
|
has 'constructor_params' => (is => 'ro', isa => 'HashRef'); |
13
|
|
|
|
|
|
|
has 'cli_params' => (is => 'ro', isa => 'HashRef'); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding UTF-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
MooseX::Getopt::ProcessedArgv - MooseX::Getopt::ProcessedArgv - Class containing the results of process_argv |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 0.75 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use My::App; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $pa = My::App->process_argv(@params); |
38
|
|
|
|
|
|
|
my $argv_copy = $pa->argv_copy(); |
39
|
|
|
|
|
|
|
my $extra_argv = $pa->extra_argv(); |
40
|
|
|
|
|
|
|
my $usage = $pa->usage(); |
41
|
|
|
|
|
|
|
my $constructor_params = $pa->constructor_params(); |
42
|
|
|
|
|
|
|
my $cli_params = $pa->cli_params(); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This object contains the result of a L<MooseX::Getopt/process_argv> call. It |
47
|
|
|
|
|
|
|
contains all the information that L<MooseX::Getopt/new_with_options> uses |
48
|
|
|
|
|
|
|
when calling new. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 METHODS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 argv_copy |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Reference to a copy of the original C<@ARGV> array as it originally existed |
55
|
|
|
|
|
|
|
at the time of C<new_with_options>. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 extra_arg |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Arrayref of leftover C<@ARGV> elements that L<Getopt::Long> did not parse. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 usage |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Contains the L<Getopt::Long::Descriptive::Usage> object (if |
64
|
|
|
|
|
|
|
L<Getopt::Long::Descriptive> is used). |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 constructor_params |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Parameters passed to process_argv. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 cli_param |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Command-line parameters parsed out of C<@ARGV>. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SUPPORT |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> |
77
|
|
|
|
|
|
|
(or L<bug-MooseX-Getopt@rt.cpan.org|mailto:bug-MooseX-Getopt@rt.cpan.org>). |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
80
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
83
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Stevan Little <stevan@iinteractive.com> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Infinity Interactive, Inc. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |