line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
1
|
|
|
1
|
|
91137
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use List::MoreUtils qw(uniq); |
7
|
1
|
|
|
1
|
|
580
|
use Catmandu::Util::Path qw(as_path); |
|
1
|
|
|
|
|
8155
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
1371
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
9
|
1
|
|
|
1
|
|
7
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
10
|
1
|
|
|
1
|
|
357
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
11
|
1
|
|
|
1
|
|
676
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::Builder'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
as_path($self->path)->updater( |
18
|
1
|
|
|
1
|
|
13
|
if_array_ref => sub { |
19
|
|
|
|
|
|
|
no warnings 'uninitialized'; |
20
|
|
|
|
|
|
|
[List::MoreUtils::uniq(@{$_[0]})]; |
21
|
1
|
|
|
1
|
|
352
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
112
|
|
22
|
1
|
|
|
1
|
|
2
|
); |
|
1
|
|
|
|
|
24
|
|
23
|
|
|
|
|
|
|
} |
24
|
1
|
|
|
|
|
7
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Catmandu::Fix::uniq - strip duplicate values from an array |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# {tags => ["foo", "bar", "bar", "foo"]} |
37
|
|
|
|
|
|
|
uniq(tags) |
38
|
|
|
|
|
|
|
# {tags => ["foo", "bar"]} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SEE ALSO |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
L<Catmandu::Fix> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |