line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::append; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
103117
|
use Catmandu::Sane; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
15
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.2020'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
15
|
use Moo; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
8
|
2
|
|
|
2
|
|
1131
|
use Catmandu::Util::Path qw(as_path); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
9
|
2
|
|
|
2
|
|
14
|
use namespace::clean; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
9
|
|
10
|
2
|
|
|
2
|
|
1073
|
use Catmandu::Fix::Has; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
13
|
|
|
|
|
|
|
has value => (fix_arg => 1); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'Catmandu::Fix::Builder'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _build_fixer { |
18
|
3
|
|
|
3
|
|
39
|
my ($self) = @_; |
19
|
3
|
|
|
|
|
13
|
my $val = $self->value; |
20
|
3
|
|
|
7
|
|
21
|
as_path($self->path)->updater(if_value => sub {join('', $_[0], $val)}); |
|
7
|
|
|
|
|
141
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Catmandu::Fix::append - add a suffix to the value of a field |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# append to a value. e.g. {name => 'joe'} |
36
|
|
|
|
|
|
|
append(name, y) # {name => 'joey'} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SEE ALSO |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
L<Catmandu::Fix> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |