line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::reject; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
1227
|
use Catmandu::Sane; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
115
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.2020'; |
6
|
|
|
|
|
|
|
|
7
|
15
|
|
|
15
|
|
116
|
use Moo; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
121
|
|
8
|
15
|
|
|
15
|
|
5762
|
use namespace::clean; |
|
15
|
|
|
|
|
48
|
|
|
15
|
|
|
|
|
103
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Catmandu::Fix::Base'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub emit { |
13
|
26
|
|
|
26
|
0
|
75
|
my ($self, $fixer) = @_; |
14
|
26
|
|
|
|
|
108
|
$fixer->emit_reject; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Catmandu::Fix::reject - remove a record form the data |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SYNOPSIS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Reject all items from from the output |
30
|
|
|
|
|
|
|
reject() |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Reject all items with have an 'ignore_me' field |
33
|
|
|
|
|
|
|
reject exists(ignore_me) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Reject all items with have a 'ignore' field with value 'true' |
36
|
|
|
|
|
|
|
reject all_match(ignore,true) |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Select all items |
39
|
|
|
|
|
|
|
select() |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Select only those items that have an 'include_me' field |
42
|
|
|
|
|
|
|
select exists(include_me) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Select only those items that have an 'include' field with value 'true' |
45
|
|
|
|
|
|
|
select all_match(include,true) |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SEE ALSO |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L<Catmandu::Fix> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |