line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TableDataRole::Munge::Reverse; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
489
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use Role::Tiny; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2023-06-14'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'TableDataRoles-Standard'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.016'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'TableDataRole::Spec::Basic'; |
15
|
|
|
|
|
|
|
with 'TableDataRole::Source::AOA'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
1
|
|
|
1
|
1
|
616
|
require Module::Load::Util; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
1601
|
my ($class, %args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
50
|
|
|
|
6
|
my $tabledata = delete $args{tabledata} or die "Please specify 'tabledata' argument"; |
23
|
1
|
|
50
|
|
|
13
|
my $load = delete($args{load}) // 1; |
24
|
1
|
50
|
|
|
|
4
|
die "Unknown argument(s): ". join(", ", sort keys %args) |
25
|
|
|
|
|
|
|
if keys %args; |
26
|
1
|
|
|
|
|
7
|
my $td = Module::Load::Util::instantiate_class_with_optional_args( |
27
|
|
|
|
|
|
|
{load=>$load, ns_prefix=>"TableData"}, $tabledata); |
28
|
1
|
|
|
|
|
10
|
my @rows = reverse $td->get_all_rows_arrayref; |
29
|
1
|
|
|
|
|
9
|
my $column_names = $td->get_column_names; |
30
|
1
|
|
|
|
|
11
|
TableDataRole::Source::AOA->new( |
31
|
|
|
|
|
|
|
aoa => \@rows, |
32
|
|
|
|
|
|
|
column_names => $column_names, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
# ABSTRACT: Reverse the rows of another tabledata |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |