line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
2
|
|
|
2
|
|
782
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
7
|
2
|
|
|
2
|
|
14
|
use namespace::clean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
13
|
|
8
|
2
|
|
|
2
|
|
663
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
17
|
|
9
|
|
|
|
|
|
|
extends 'Catmandu::Fix::Condition::all_match'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
38
|
1; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=pod |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::Condition::any_match - only execute fixes if any path value matches the given regex |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# uppercase the value of field 'foo' if at least one member of 'oogly' has the value 'doogly' |
24
|
|
|
|
|
|
|
if any_match(oogly, "doogly") |
25
|
|
|
|
|
|
|
upcase(foo) # foo => 'BAR' |
26
|
|
|
|
|
|
|
end |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# case insensitive search for 'doogly' in 'oogly' fields |
29
|
|
|
|
|
|
|
if any_match(oogly.*, "(?i)doogly") |
30
|
|
|
|
|
|
|
... |
31
|
|
|
|
|
|
|
end |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SEE ALSO |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
L<Catmandu::Fix> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |