line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
2
|
|
|
2
|
|
92526
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
7
|
2
|
|
|
2
|
|
12
|
use namespace::clean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
8
|
2
|
|
|
2
|
|
643
|
use Catmandu::Fix::Has; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
9
|
|
9
|
2
|
|
|
2
|
|
912
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
10
|
|
|
|
|
|
|
with 'Catmandu::Fix::Base'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my ($self, $fixer) = @_; |
15
|
|
|
|
|
|
|
my $path = $fixer->split_path($self->path); |
16
|
8
|
|
|
8
|
0
|
14
|
my $key = pop @$path; |
17
|
8
|
|
|
|
|
27
|
|
18
|
8
|
|
|
|
|
16
|
$fixer->emit_walk_path( |
19
|
|
|
|
|
|
|
$fixer->var, |
20
|
|
|
|
|
|
|
$path, |
21
|
|
|
|
|
|
|
sub { |
22
|
|
|
|
|
|
|
my $var = shift; |
23
|
|
|
|
|
|
|
$fixer->emit_retain_key($var, $key); |
24
|
8
|
|
|
8
|
|
13
|
} |
25
|
8
|
|
|
|
|
20
|
); |
26
|
|
|
|
|
|
|
} |
27
|
8
|
|
|
|
|
128
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Catmandu::Fix::retain_field - delete everything from a field except |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DEPRECIATION NOTICE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This fix is deprecated, Please use L<Catmandu::Fix::retain> instead. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Delete every key from foo except bar |
44
|
|
|
|
|
|
|
retain_field(foo.bar) |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SEE ALSO |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
L<Catmandu::Fix> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |