line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TableDataRole::Munge::Reverse; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
454
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Role::Tiny; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2023-02-24'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'TableDataRoles-Standard'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.015'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'TableDataRole::Spec::Basic'; |
15
|
|
|
|
|
|
|
with 'TableDataRole::Source::AOA'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
1
|
|
|
1
|
1
|
559
|
require Module::Load::Util; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
1830
|
my ($class, %args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
50
|
|
|
|
6
|
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
|
|
|
|
|
5
|
my $td = Module::Load::Util::instantiate_class_with_optional_args( |
26
|
|
|
|
|
|
|
{ns_prefix=>"TableData"}, $tabledata); |
27
|
1
|
|
|
|
|
17
|
my @rows = reverse $td->get_all_rows_arrayref; |
28
|
1
|
|
|
|
|
5
|
my $column_names = $td->get_column_names; |
29
|
1
|
|
|
|
|
9
|
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__ |