line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Getopt::ArgParse::ActionAppend; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
607
|
use strict; |
|
9
|
|
|
|
|
12
|
|
|
9
|
|
|
|
|
363
|
|
4
|
9
|
|
|
9
|
|
40
|
use warnings; |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
223
|
|
5
|
9
|
|
|
9
|
|
35
|
use Carp; |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
586
|
|
6
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
45
|
use Getopt::ArgParse::Parser; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
1528
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub apply { |
10
|
33
|
|
|
33
|
0
|
181
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
33
|
|
|
|
|
37
|
my ($spec, $namespace, $values) = @_; |
13
|
|
|
|
|
|
|
|
14
|
33
|
|
|
|
|
62
|
my $v = $namespace->get_attr( $spec->{dest} ); |
15
|
|
|
|
|
|
|
|
16
|
33
|
100
|
|
|
|
71
|
if ($spec->{type} == Getopt::ArgParse::Parser::TYPE_PAIR) { |
17
|
6
|
100
|
|
|
|
15
|
$v = {} unless defined $v; |
18
|
|
|
|
|
|
|
|
19
|
6
|
|
|
|
|
10
|
for my $pair (@$values) { |
20
|
9
|
|
|
|
|
20
|
my ($key, $val) = %$pair; |
21
|
9
|
|
|
|
|
16
|
$v->{$key} = $val; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} else { |
25
|
27
|
100
|
|
|
|
56
|
$v = [] unless defined $v; |
26
|
27
|
|
|
|
|
46
|
push @$v, @$values; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
33
|
|
|
|
|
65
|
$namespace->set_attr( $spec->{dest}, $v ); |
30
|
|
|
|
|
|
|
|
31
|
33
|
|
|
|
|
51
|
return ''; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 AUTHOR |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Mytram (original author) |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Mytram. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This is free software, licensed under: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|