| 1 | # ABSTRACT: DAO request - update relationships | ||||||||||
| 2 | package PONAPI::DAO::Request::UpdateRelationships; | ||||||||||
| 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::HasDataMethods', | ||||||||||
| 10 | 'PONAPI::DAO::Request::Role::HasID', | ||||||||||
| 11 | 'PONAPI::DAO::Request::Role::HasRelationshipType'; | ||||||||||
| 12 | |||||||||||
| 13 | 8 | has data => ( | |||||||||
| 14 | is => 'ro', | ||||||||||
| 15 | isa => 'Maybe[HashRef|ArrayRef]', | ||||||||||
| 16 | predicate => 'has_data', | ||||||||||
| 17 | ); | ||||||||||
| 18 | |||||||||||
| 19 | 13 | ▶ | sub check_data_type_match { 1 } # to avoid code duplications in HasDataMethods | ||||||||
|
Subroutine
check_data_type_match: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | |||||||||||
| 21 | sub execute { | ||||||||||
| 22 | 14 | ▶ | my $self = shift; | ||||||||
|
Subroutine
execute: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 23 | 14 | ▶ | if ( $self->is_valid ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 9 | my @ret = $self->repository->update_relationships( %{ $self } ); | |||||||||
| 25 | |||||||||||
| 26 | 6 | ▶ | $self->_add_success_meta(@ret) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | if $self->_verify_update_response(@ret); | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 10 | return $self->response(); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | 8 | __PACKAGE__->meta->make_immutable; | |||||||||
| 35 | 8 | ▶ | no Moose; 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 36 | |||||||||||
| 37 | __END__ | ||||||||||
| 38 | |||||||||||
| 39 | =pod | ||||||||||
| 40 | |||||||||||
| 41 | =encoding UTF-8 | ||||||||||
| 42 | |||||||||||
| 43 | =head1 NAME | ||||||||||
| 44 | |||||||||||
| 45 | PONAPI::DAO::Request::UpdateRelationships - DAO request - update relationships | ||||||||||
| 46 | |||||||||||
| 47 | =head1 VERSION | ||||||||||
| 48 | |||||||||||
| 49 | version 0.003002 | ||||||||||
| 50 | |||||||||||
| 51 | =head1 AUTHORS | ||||||||||
| 52 | |||||||||||
| 53 | =over 4 | ||||||||||
| 54 | |||||||||||
| 55 | =item * | ||||||||||
| 56 | |||||||||||
| 57 | Mickey Nasriachi <mickey@cpan.org> | ||||||||||
| 58 | |||||||||||
| 59 | =item * | ||||||||||
| 60 | |||||||||||
| 61 | Stevan Little <stevan@cpan.org> | ||||||||||
| 62 | |||||||||||
| 63 | =item * | ||||||||||
| 64 | |||||||||||
| 65 | Brian Fraser <hugmeir@cpan.org> | ||||||||||
| 66 | |||||||||||
| 67 | =back | ||||||||||
| 68 | |||||||||||
| 69 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 70 | |||||||||||
| 71 | This software is copyright (c) 2017 by Mickey Nasriachi, Stevan Little, Brian Fraser. | ||||||||||
| 72 | |||||||||||
| 73 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 74 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 75 | |||||||||||
| 76 | =cut | ||||||||||