PONAPI/DAO/Request/Retrieve.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 95.8% 23 / 24 CC 3 SCAR 7.9
CC
3
Cov
100%
execute
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« PONAPI/Server/ConfigReader.pm ↑ Summary PONAPI/DAO/Request/Role/HasPage.pm »
1 # ABSTRACT: DAO request - retrieve
2 package PONAPI::DAO::Request::Retrieve;
3  
4 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 extends 'PONAPI::DAO::Request';
7  
8 8 with 'PONAPI::DAO::Request::Role::HasFields',
9 'PONAPI::DAO::Request::Role::HasFilter',
10 'PONAPI::DAO::Request::Role::HasInclude',
11 # paginate included resources
12 'PONAPI::DAO::Request::Role::HasPage',
13 # sort is needed by page
14 'PONAPI::DAO::Request::Role::HasSort',
15 'PONAPI::DAO::Request::Role::HasID';
16  
17 sub execute {
18 54 ▶ my $self = shift;
Subroutine execute: called CC=3 SCAR=11.0
Pod undocumented
19  
20 54 ▶ if ( $self->is_valid ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->is_valid) 40 14 54
21 40 $self->repository->retrieve( %{ $self } );
22 37 ▶ $self->document->add_null_resource
Branch: 1 branch
BranchTrueFalseTotal
unless $self->document->has_resource_builders 6 31 37
23 unless $self->document->has_resource_builders;
24 }
25  
26 51 return $self->response();
27 }
28  
29 8 __PACKAGE__->meta->make_immutable;
30 8 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 __END__
33  
34 =pod
35  
36 =encoding UTF-8
37  
38 =head1 NAME
39  
40 PONAPI::DAO::Request::Retrieve - DAO request - retrieve
41  
42 =head1 VERSION
43  
44 version 0.003002
45  
46 =head1 AUTHORS
47  
48 =over 4
49  
50 =item *
51  
52 Mickey Nasriachi <mickey@cpan.org>
53  
54 =item *
55  
56 Stevan Little <stevan@cpan.org>
57  
58 =item *
59  
60 Brian Fraser <hugmeir@cpan.org>
61  
62 =back
63  
64 =head1 COPYRIGHT AND LICENSE
65  
66 This software is copyright (c) 2017 by Mickey Nasriachi, Stevan Little, Brian Fraser.
67  
68 This is free software; you can redistribute it and/or modify it under
69 the same terms as the Perl 5 programming language system itself.
70  
71 =cut
« PONAPI/Server/ConfigReader.pm ↑ Summary PONAPI/DAO/Request/Role/HasPage.pm »