File Coverage

blib/lib/PONAPI/DAO/Request/RetrieveAll.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 18 19 94.7


line stmt bran cond sub pod time code
1             # ABSTRACT: DAO request - retrieve all
2             package PONAPI::DAO::Request::RetrieveAll;
3              
4 8     8   65 use Moose;
  8         20  
  8         88  
5              
6             extends 'PONAPI::DAO::Request';
7              
8             with 'PONAPI::DAO::Request::Role::HasFields',
9             'PONAPI::DAO::Request::Role::HasFilter',
10             'PONAPI::DAO::Request::Role::HasInclude',
11             'PONAPI::DAO::Request::Role::HasPage',
12             'PONAPI::DAO::Request::Role::HasSort';
13              
14             sub execute {
15 31     31 0 69 my $self = shift;
16 31         907 my $doc = $self->document;
17              
18 31 100       876 if ( $self->is_valid ) {
19 21         144 $doc->convert_to_collection;
20 21         1619 $self->repository->retrieve_all( %{ $self } );
  21         179  
21             }
22              
23 28         1005 return $self->response();
24             }
25              
26             __PACKAGE__->meta->make_immutable;
27 8     8   56680 no Moose; 1;
  8         23  
  8         50  
28              
29             __END__
30              
31             =pod
32              
33             =encoding UTF-8
34              
35             =head1 NAME
36              
37             PONAPI::DAO::Request::RetrieveAll - DAO request - retrieve all
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