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