| 1 | package Catmandu::Fix::reject; | ||
| 2 | |||
| 3 | 29 | ▶ | use Catmandu::Sane; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 29 | our $VERSION = '1.0201_02'; | |
| 6 | |||
| 7 | 29 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 29 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 29 | with 'Catmandu::Fix::Base'; | |
| 11 | |||
| 12 | sub emit { | ||
| 13 | 28 | ▶ | my ($self, $fixer) = @_; |
|
Subroutine
emit: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 28 | $fixer->emit_reject; | |
| 15 | } | ||
| 16 | |||
| 17 | 29 | 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 | ||