File Coverage

blib/lib/PONAPI/DAO/Request/Role/HasPage.pm
Criterion Covered Total %
statement 9 9 100.0
branch 2 2 100.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: DAO request role - `page`
2             package PONAPI::DAO::Request::Role::HasPage;
3              
4 8     8   5342 use Moose::Role;
  8         18  
  8         58  
5              
6             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 8     8   399 my $self = shift;
17              
18 8 100       447 $self->has_page
19             or $self->_bad_request( "`page` is missing values" );
20              
21 8         27 return;
22             }
23              
24 8     8   43032 no Moose::Role; 1;
  8         22  
  8         46  
25              
26             __END__
27              
28             =pod
29              
30             =encoding UTF-8
31              
32             =head1 NAME
33              
34             PONAPI::DAO::Request::Role::HasPage - DAO request role - `page`
35              
36             =head1 VERSION
37              
38             version 0.002006
39              
40             =head1 AUTHORS
41              
42             =over 4
43              
44             =item *
45              
46             Mickey Nasriachi <mickey@cpan.org>
47              
48             =item *
49              
50             Stevan Little <stevan@cpan.org>
51              
52             =item *
53              
54             Brian Fraser <hugmeir@cpan.org>
55              
56             =back
57              
58             =head1 COPYRIGHT AND LICENSE
59              
60             This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser.
61              
62             This is free software; you can redistribute it and/or modify it under
63             the same terms as the Perl 5 programming language system itself.
64              
65             =cut