File Coverage

blib/lib/Catmandu/Fix/remove_field.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1              
2             use Catmandu::Sane;
3 5     5   100237  
  5         12  
  5         34  
4             our $VERSION = '1.2019';
5              
6             use Moo;
7 5     5   31 use Catmandu::Util::Path qw(as_path);
  5         10  
  5         24  
8 5     5   2518 use namespace::clean;
  5         10  
  5         225  
9 5     5   26 use Catmandu::Fix::Has;
  5         10  
  5         21  
10 5     5   2319  
  5         9  
  5         30  
11             with 'Catmandu::Fix::Builder';
12              
13             has path => (fix_arg => 1);
14              
15             my ($self) = @_;
16             as_path($self->path)->deleter;
17 8     8   63 }
18 8         31  
19             1;
20              
21              
22             =pod
23              
24             =head1 NAME
25              
26             Catmandu::Fix::remove_field - remove a field form the data
27              
28             =head1 SYNOPSIS
29              
30             # Remove the foo.bar field
31             remove_field(foo.bar)
32              
33             =head1 SEE ALSO
34              
35             L<Catmandu::Fix>
36              
37             =cut