line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::Eta::Controller::AutoListGET; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1243
|
use Moose::Role; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
33
|
|
4
|
|
|
|
|
|
|
requires 'list_GET'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# inline-sub make test cover fail to compute! |
7
|
|
|
|
|
|
|
around list_GET => \&AutoList_around_list_GET; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub AutoList_around_list_GET { |
10
|
3
|
|
|
3
|
|
21
|
my $orig = shift; |
11
|
3
|
|
|
|
|
8
|
my $self = shift; |
12
|
3
|
|
|
|
|
7
|
my ($c) = @_; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#print " AutoList::around list_GET \n"; |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
|
|
13
|
my $nameret = $self->config->{list_key}; |
17
|
3
|
|
33
|
|
|
192
|
my $func = $self->config->{build_list_row} || $self->config->{build_row}; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
431
|
my @rows; |
20
|
3
|
|
|
|
|
15
|
while ( my $r = $c->stash->{collection}->next ) { |
21
|
4
|
|
|
|
|
7118
|
push @rows, $func->($r, $self, $c); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
$self->status_ok( |
24
|
3
|
|
|
|
|
1387
|
$c, |
25
|
|
|
|
|
|
|
entity => { |
26
|
|
|
|
|
|
|
$nameret => \@rows |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
|
|
865
|
$self->$orig(@_); |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|