line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
1
|
|
|
1
|
|
573
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
7
|
1
|
|
|
1
|
|
7
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
8
|
1
|
|
|
1
|
|
300
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
9
|
|
|
|
|
|
|
extends 'Catmandu::Fix::Condition::all_equal'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
20
|
1; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=pod |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::Condition::any_equal - Execute fixes when at least one of the path values equal a string value |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This fix is meant as an simple alternative to L<Catmandu::Fix::Condition::any_match>. |
24
|
|
|
|
|
|
|
No regular expressions are involved. String are compared using the regular |
25
|
|
|
|
|
|
|
operator 'eq'. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SYNOPSIS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# any_equal(X,Y) is true when at least one value of the array X equals 'Y' |
30
|
|
|
|
|
|
|
if any_equal('years.*','2018') |
31
|
|
|
|
|
|
|
add_field('my.funny.title','true') |
32
|
|
|
|
|
|
|
end |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# any_equal(X,Y) is false when none of the values of X equal 'Y' |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SEE ALSO |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
L<Catmandu::Fix> , L<Catmandu::Fix::Condition::all_equal> |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |