line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::Eta::Controller::AutoListGET; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1207
|
use Moose::Role; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
32
|
|
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
|
|
20
|
my $orig = shift; |
11
|
3
|
|
|
|
|
72
|
my $self = shift; |
12
|
3
|
|
|
|
|
8
|
my ($c) = @_; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#print " AutoList::around list_GET \n"; |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
|
|
14
|
my $nameret = $self->config->{list_key}; |
17
|
3
|
|
33
|
|
|
176
|
my $func = $self->config->{build_list_row} || $self->config->{build_row}; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
371
|
my @rows; |
20
|
3
|
|
|
|
|
13
|
while ( my $r = $c->stash->{collection}->next ) { |
21
|
4
|
|
|
|
|
6356
|
push @rows, $func->($r, $self, $c); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
$self->status_ok( |
24
|
3
|
|
|
|
|
1087
|
$c, |
25
|
|
|
|
|
|
|
entity => { |
26
|
|
|
|
|
|
|
$nameret => \@rows |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
|
|
775
|
$self->$orig(@_); |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|