blib/lib/Catmandu/Fix/append.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.1% 25 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Catmandu/Fix/Condition/less_than.pm ↑ Summary blib/lib/Catmandu/Fix/format.pm »
1 package Catmandu::Fix::append;
2  
3 2 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = '1.0201_02';
6  
7 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 has path => (fix_arg => 1);
12 2 has value => (fix_arg => 1);
13  
14 2 with 'Catmandu::Fix::SimpleGetValue';
15  
16 sub emit_value {
17 4 ▶ my ($self, $var, $fixer) = @_;
Subroutine emit_value: called CC=1 SCAR=0.0
Pod undocumented
18 4 my $value = $fixer->emit_string($self->value);
19 4 "${var} = join('', ${var}, $value) if is_value(${var});";
20 }
21  
22 2 1;
23  
24 __END__
25  
26 =pod
27  
28 =head1 NAME
29  
30 Catmandu::Fix::append - add a suffix to the value of a field
31  
32 =head1 SYNOPSIS
33  
34 # append to a value. e.g. {name => 'joe'}
35 append(name, y) # {name => 'joey'}
36  
37 =head1 SEE ALSO
38  
39 L<Catmandu::Fix>
40  
41 =cut
« blib/lib/Catmandu/Fix/Condition/less_than.pm ↑ Summary blib/lib/Catmandu/Fix/format.pm »