« blib/lib/Catmandu/Fix/Condition/is_array.pm
↑ Summary
blib/lib/Catmandu/Fix/Condition/is_number.pm »
| 1 | package Catmandu::Fix::Condition::is_null; | ||
| 2 | |||
| 3 | 1 | ▶ | use Catmandu::Sane; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | our $VERSION = '1.0201_02'; | |
| 6 | |||
| 7 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use Catmandu::Fix::Has; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 1 | has path => (fix_arg => 1); | |
| 12 | |||
| 13 | 1 | with 'Catmandu::Fix::Condition::SimpleAllTest'; | |
| 14 | |||
| 15 | sub emit_test { | ||
| 16 | 1 | ▶ | my ($self, $var) = @_; |
|
Subroutine
emit_test: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | 1 | "(defined(${var}) ? 0 : 1)"; | |
| 18 | } | ||
| 19 | |||
| 20 | 1 | 1; | |
| 21 | |||
| 22 | __END__ | ||
| 23 | |||
| 24 | =pod | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Catmandu::Fix::Condition::is_null - only execute fixes if all path values are null | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | if is_null(data.*) | ||
| 33 | ... | ||
| 34 | end | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<Catmandu::Fix> | ||
| 39 | |||
| 40 | =cut | ||