| Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/DAO/Request/Update.pm |
| Statements | Executed 9 statements in 237µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 19µs | 3.20ms | PONAPI::DAO::Request::Update::BEGIN@4 |
| 1 | 1 | 1 | 8µs | 75µs | PONAPI::DAO::Request::Update::BEGIN@32 |
| 0 | 0 | 0 | 0s | 0s | PONAPI::DAO::Request::Update::__ANON__[lib/PONAPI/DAO/Request/Update.pm:15] |
| 0 | 0 | 0 | 0s | 0s | PONAPI::DAO::Request::Update::execute |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # ABSTRACT: DAO request - update | ||||
| 2 | package PONAPI::DAO::Request::Update; | ||||
| 3 | |||||
| 4 | 2 | 159µs | 2 | 6.38ms | # spent 3.20ms (19µs+3.18) within PONAPI::DAO::Request::Update::BEGIN@4 which was called:
# once (19µs+3.18ms) by PONAPI::DAO::BEGIN@12 at line 4 # spent 3.20ms making 1 call to PONAPI::DAO::Request::Update::BEGIN@4
# spent 3.18ms making 1 call to Moose::import |
| 5 | |||||
| 6 | 1 | 14µs | 1 | 567µs | extends 'PONAPI::DAO::Request'; # spent 567µs making 1 call to Moose::extends |
| 7 | |||||
| 8 | 1 | 3µs | 1 | 20.8ms | with 'PONAPI::DAO::Request::Role::UpdateLike', # spent 20.8ms making 1 call to Moose::with |
| 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 | 1 | 5µs | 1 | 2.82ms | ); # spent 2.82ms making 1 call to Moose::has |
| 17 | |||||
| 18 | sub execute { | ||||
| 19 | my $self = shift; | ||||
| 20 | |||||
| 21 | if ( $self->is_valid ) { | ||||
| 22 | my @ret = $self->repository->update( %{ $self } ); | ||||
| 23 | |||||
| 24 | $self->_add_success_meta(@ret) | ||||
| 25 | if $self->_verify_update_response(@ret); | ||||
| 26 | } | ||||
| 27 | |||||
| 28 | return $self->response(); | ||||
| 29 | } | ||||
| 30 | |||||
| 31 | 1 | 4µs | 2 | 6.09ms | __PACKAGE__->meta->make_immutable; # spent 6.08ms making 1 call to Class::MOP::Class::make_immutable
# spent 11µs making 1 call to PONAPI::DAO::Request::Update::meta |
| 32 | 3 | 52µs | 2 | 142µs | # spent 75µs (8+66) within PONAPI::DAO::Request::Update::BEGIN@32 which was called:
# once (8µs+66µs) by PONAPI::DAO::BEGIN@12 at line 32 # spent 75µs making 1 call to PONAPI::DAO::Request::Update::BEGIN@32
# spent 66µs making 1 call to Moose::unimport |
| 33 | |||||
| 34 | __END__ |