line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: App::Spec objects representing command line option specs |
2
|
5
|
|
|
5
|
|
29
|
use strict; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
114
|
|
3
|
5
|
|
|
5
|
|
19
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
220
|
|
4
|
|
|
|
|
|
|
package App::Spec::Option; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.012'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
25
|
use base 'App::Spec::Argument'; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
1728
|
|
9
|
5
|
|
|
5
|
|
35
|
use Moo; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
19
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has aliases => ( is => 'ro' ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub build { |
14
|
427
|
|
|
427
|
1
|
1709
|
my ($class, %args) = @_; |
15
|
427
|
|
|
|
|
1666
|
my %hash = $class->common(%args); |
16
|
|
|
|
|
|
|
my $self = $class->new({ |
17
|
427
|
|
100
|
|
|
10936
|
aliases => $args{aliases} || [], |
18
|
|
|
|
|
|
|
%hash, |
19
|
|
|
|
|
|
|
}); |
20
|
427
|
|
|
|
|
22859
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
App::Spec::Option - App::Spec objects representing command line option specs |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This class inherits from L |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 METHODS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=over 4 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item build |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $option = App::Spec::Option->build( |
42
|
|
|
|
|
|
|
name => 'verbose', |
43
|
|
|
|
|
|
|
summary => 'lala', |
44
|
|
|
|
|
|
|
aliases => ['v'], |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item aliases |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Attribute which represents the one from the spec. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |