Catmandu/Fix/set_field.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catmandu/Fix/set_array.pm ↑ Summary Catmandu/Fix/set_hash.pm »
1 package Catmandu::Fix::set_field;
2  
3 19 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 19 our $VERSION = '1.2025';
6  
7 19 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 19 ▶use Catmandu::Util::Path qw(as_path);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 19 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 19 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 19 with 'Catmandu::Fix::Builder';
13  
14 19 has path => (fix_arg => 1);
15 1 ▶has value => (fix_arg => 1, default => sub {undef});
Subroutine __ANON__: called CC=1 SCAR=0.0
16  
17 64 ▶sub _build_fixer {
Subroutine _build_fixer: called CC=1 SCAR=0.0
18 64 my ($self) = @_;
19 64 as_path($self->path)->setter($self->value);
20 }
21  
22 19 1;
23  
24 __END__
« Catmandu/Fix/set_array.pm ↑ Summary Catmandu/Fix/set_hash.pm »