line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: DAO request role - `sort` |
2
|
|
|
|
|
|
|
package PONAPI::DAO::Request::Role::HasSort; |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
4099
|
use Moose::Role; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has sort => ( |
7
|
|
|
|
|
|
|
traits => [ 'Array' ], |
8
|
|
|
|
|
|
|
is => 'ro', |
9
|
|
|
|
|
|
|
isa => 'ArrayRef', |
10
|
|
|
|
|
|
|
default => sub { +[] }, |
11
|
|
|
|
|
|
|
handles => { |
12
|
|
|
|
|
|
|
"has_sort" => 'count', |
13
|
|
|
|
|
|
|
}, |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _validate_sort { |
17
|
112
|
|
|
112
|
|
273
|
my ( $self, $args ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
112
|
100
|
|
|
|
355
|
return unless defined $args->{sort}; |
20
|
|
|
|
|
|
|
|
21
|
9
|
100
|
|
|
|
367
|
$self->has_sort |
22
|
|
|
|
|
|
|
or $self->_bad_request( "`sort` is missing values" ); |
23
|
|
|
|
|
|
|
|
24
|
9
|
|
|
|
|
19
|
return; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
8
|
|
|
8
|
|
41760
|
no Moose::Role; 1; |
|
8
|
|
|
|
|
43
|
|
|
8
|
|
|
|
|
45
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=encoding UTF-8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
PONAPI::DAO::Request::Role::HasSort - DAO request role - `sort` |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
version 0.003003 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHORS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=over 4 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item * |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item * |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item * |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=back |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is copyright (c) 2019 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
66
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |