line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: DAO request - update |
2
|
|
|
|
|
|
|
package PONAPI::DAO::Request::Update; |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
73
|
use Moose; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
70
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'PONAPI::DAO::Request'; |
7
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
default => sub { 404 }, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub execute { |
19
|
25
|
|
|
25
|
0
|
53
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
25
|
100
|
|
|
|
932
|
if ( $self->is_valid ) { |
22
|
17
|
|
|
|
|
665
|
my @ret = $self->repository->update( %{ $self } ); |
|
17
|
|
|
|
|
128
|
|
23
|
|
|
|
|
|
|
|
24
|
13
|
50
|
|
|
|
175
|
$self->_add_success_meta(@ret) |
25
|
|
|
|
|
|
|
if $self->_verify_update_response(@ret); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
20
|
|
|
|
|
113
|
return $self->response(); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
8
|
|
|
8
|
|
53897
|
no Moose; 1; |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
44
|
|
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.002006 |
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) 2016 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 |