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