PONAPI/DAO/Request/Update.pm

filter: Statementstmt 100% 18 / 18 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 92.5% 25 / 27 CC 3 SCAR 7.0
CC
3
Cov
95%
execute
3.0
BEGIN
1.0
__ANON__
1.0
CRAP 2.0
« PONAPI/DAO/Request/UpdateRelationships.pm ↑ Summary PONAPI/CLI.pm »
1 # ABSTRACT: DAO request - update
2 package PONAPI::DAO::Request::Update;
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::UpdateLike',
9 'PONAPI::DAO::Request::Role::HasData',
10 'PONAPI::DAO::Request::Role::HasDataMethods',
11 'PONAPI::DAO::Request::Role::HasID';
12  
13 has '+update_nothing_status' => (
14 # http://jsonapi.org/format/#crud-updating-responses-404
15 26 ▶ default => sub { 404 },
Subroutine __ANON__: called CC=1 SCAR=0.0
16 8 );
17  
18 sub execute {
19 25 ▶ my $self = shift;
Subroutine execute: called CC=3 SCAR=11.0
Pod undocumented
20  
21 25 ▶ if ( $self->is_valid ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->is_valid) 17 8 25
22 17 my @ret = $self->repository->update( %{ $self } );
23  
24 13 ▶ $self->_add_success_meta(@ret)
Branch: 1 branch
BranchTrueFalseTotal
if $self->_verify_update_response(@ret) 12 0 12
25 if $self->_verify_update_response(@ret);
26 }
27  
28 20 return $self->response();
29 }
30  
31 8 __PACKAGE__->meta->make_immutable;
32 8 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 __END__
35  
36 =pod
37  
38 =encoding UTF-8
39  
40 =head1 NAME
41  
42 PONAPI::DAO::Request::Update - DAO request - update
43  
44 =head1 VERSION
45  
46 version 0.003002
47  
48 =head1 AUTHORS
49  
50 =over 4
51  
52 =item *
53  
54 Mickey Nasriachi <mickey@cpan.org>
55  
56 =item *
57  
58 Stevan Little <stevan@cpan.org>
59  
60 =item *
61  
62 Brian Fraser <hugmeir@cpan.org>
63  
64 =back
65  
66 =head1 COPYRIGHT AND LICENSE
67  
68 This software is copyright (c) 2017 by Mickey Nasriachi, Stevan Little, Brian Fraser.
69  
70 This is free software; you can redistribute it and/or modify it under
71 the same terms as the Perl 5 programming language system itself.
72  
73 =cut
« PONAPI/DAO/Request/UpdateRelationships.pm ↑ Summary PONAPI/CLI.pm »