File Coverage

blib/lib/Catmandu/Fix/Condition/is_null.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 22 22 100.0


line stmt bran cond sub pod time code
1              
2             use Catmandu::Sane;
3 1     1   680  
  1         2  
  1         6  
4             our $VERSION = '1.2019';
5              
6             use Moo;
7 1     1   6 use namespace::clean;
  1         2  
  1         11  
8 1     1   311 use Catmandu::Fix::Has;
  1         3  
  1         5  
9 1     1   338  
  1         2  
  1         9  
10             has path => (fix_arg => 1);
11              
12             with 'Catmandu::Fix::Condition::Builder::Simple';
13              
14             sub {
15             defined($_[0]) ? 0 : 1;
16             };
17 3 100   3   59 }
18 1     1   12  
19             1;
20              
21              
22             =pod
23              
24             =head1 NAME
25              
26             Catmandu::Fix::Condition::is_null - only execute fixes if all path values are null
27              
28             =head1 SYNOPSIS
29              
30             if is_null(data.*)
31             ...
32             end
33              
34             =head1 SEE ALSO
35              
36             L<Catmandu::Fix>
37              
38             =cut