Catmandu/Fix/split_field.pm

filter: Statementstmt 96.0% 24 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 93.9% 31 / 33 CC 1 SCAR 0.2
CC
1
Cov
96%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catmandu/Fix/index.pm ↑ Summary Catmandu/Fix/join_field.pm »
1 package Catmandu::Fix::split_field;
2  
3 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.2025';
6  
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Catmandu::Util::Path qw(as_path);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 has path => (fix_arg => 1);
13 0 ▶has split_char => (fix_arg => 1, default => sub {qr'\s+'});
Subroutine __ANON__: not called CC=1 SCAR=1.2
14  
15 1 with 'Catmandu::Fix::Builder';
16  
17 3 ▶sub _build_fixer {
Subroutine _build_fixer: called CC=1 SCAR=0.0
18 3 my ($self) = @_;
19 3 my $split_char = $self->split_char;
20 as_path($self->path)
21 3 ▶ ->updater(if_value => sub {[split $split_char, $_[0]]});
Subroutine __ANON__: called CC=1 SCAR=0.0
22 }
23  
24 1 1;
25  
26 __END__
« Catmandu/Fix/index.pm ↑ Summary Catmandu/Fix/join_field.pm »