line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
1
|
|
|
1
|
|
87803
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
7
|
1
|
|
|
1
|
|
6
|
use Catmandu::Util::Path qw(as_path); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
8
|
1
|
|
|
1
|
|
673
|
use namespace::clean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
9
|
1
|
|
|
1
|
|
5
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
10
|
1
|
|
|
1
|
|
565
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
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
|
|
3
|
if_string => sub { |
|
1
|
|
|
|
|
16
|
|
21
|
|
|
|
|
|
|
scalar(reverse($_[0])); |
22
|
|
|
|
|
|
|
}, |
23
|
1
|
|
|
1
|
|
22
|
); |
24
|
|
|
|
|
|
|
} |
25
|
2
|
|
|
|
|
12
|
|
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 |