Catmandu/Fix/Condition/is_string.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 30 / 30 CC 2 SCAR 2.2
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Catmandu/Fix/Condition/exists.pm ↑ Summary Catmandu/Importer/JSON.pm »
1 package Catmandu::Fix::Condition::is_string;
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 qw(is_number is_value);
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  
14 1 with 'Catmandu::Fix::Condition::Builder::Simple';
15  
16 1 ▶sub _build_value_tester {
Subroutine _build_value_tester: called CC=1 SCAR=0.0
17 8 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
18 8 ▶ !is_number($_[0]) && is_value($_[0]);
Branch: 1 branch
BranchTrueFalseTotal
not is_number($_[0]) and is_value($_[0]) 2 6 8
19 1 };
20 }
21  
22 1 1;
23  
24 __END__
« Catmandu/Fix/Condition/exists.pm ↑ Summary Catmandu/Importer/JSON.pm »