line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
1
|
|
|
1
|
|
92367
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2019'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
7
|
1
|
|
|
1
|
|
8
|
use Catmandu::Util::Path qw(as_path); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
8
|
1
|
|
|
1
|
|
807
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
9
|
1
|
|
|
1
|
|
5
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
10
|
1
|
|
|
1
|
|
644
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Fix::Builder'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my ($self) = @_; |
16
|
|
|
|
|
|
|
as_path($self->path)->updater( |
17
|
2
|
|
|
2
|
|
20
|
if_array_ref => sub { |
18
|
|
|
|
|
|
|
[reverse(@{$_[0]})]; |
19
|
|
|
|
|
|
|
}, |
20
|
1
|
|
|
1
|
|
2
|
if_string => sub { |
|
1
|
|
|
|
|
18
|
|
21
|
|
|
|
|
|
|
scalar(reverse($_[0])); |
22
|
|
|
|
|
|
|
}, |
23
|
1
|
|
|
1
|
|
20
|
); |
24
|
|
|
|
|
|
|
} |
25
|
2
|
|
|
|
|
15
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Catmandu::Fix::reverse - reverse a string or an array |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# {author => "tom jones"} |
38
|
|
|
|
|
|
|
reverse(author) |
39
|
|
|
|
|
|
|
# {author => "senoj mot"} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# {numbers => [1,14,2]} |
42
|
|
|
|
|
|
|
reverse(numbers) |
43
|
|
|
|
|
|
|
# {numbers => [2,14,1]} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SEE ALSO |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
L<Catmandu::Fix> |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |