| Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/DAO/Request/Delete.pm |
| Statements | Executed 8 statements in 255µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 20µs | 7.09ms | PONAPI::DAO::Request::Delete::BEGIN@4 |
| 1 | 1 | 1 | 8µs | 75µs | PONAPI::DAO::Request::Delete::BEGIN@28 |
| 0 | 0 | 0 | 0s | 0s | PONAPI::DAO::Request::Delete::execute |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # ABSTRACT: DAO request - delete | ||||
| 2 | package PONAPI::DAO::Request::Delete; | ||||
| 3 | |||||
| 4 | 2 | 190µs | 2 | 14.2ms | # spent 7.09ms (20µs+7.07) within PONAPI::DAO::Request::Delete::BEGIN@4 which was called:
# once (20µs+7.07ms) by PONAPI::DAO::BEGIN@14 at line 4 # spent 7.09ms making 1 call to PONAPI::DAO::Request::Delete::BEGIN@4
# spent 7.07ms making 1 call to Moose::import |
| 5 | |||||
| 6 | 1 | 13µs | 1 | 628µs | extends 'PONAPI::DAO::Request'; # spent 628µs making 1 call to Moose::extends |
| 7 | |||||
| 8 | 1 | 2µs | 1 | 2.99ms | with 'PONAPI::DAO::Request::Role::HasID'; # spent 2.99ms making 1 call to Moose::with |
| 9 | |||||
| 10 | sub execute { | ||||
| 11 | my $self = shift; | ||||
| 12 | my $doc = $self->document; | ||||
| 13 | |||||
| 14 | if ( $self->is_valid ) { | ||||
| 15 | $self->repository->delete( %{ $self } ); | ||||
| 16 | $doc->add_meta( | ||||
| 17 | detail => "successfully deleted the resource /" | ||||
| 18 | . $self->type | ||||
| 19 | . "/" | ||||
| 20 | . $self->id | ||||
| 21 | ); | ||||
| 22 | } | ||||
| 23 | |||||
| 24 | return $self->response(); | ||||
| 25 | } | ||||
| 26 | |||||
| 27 | 1 | 5µs | 2 | 9.74ms | __PACKAGE__->meta->make_immutable; # spent 9.72ms making 1 call to Class::MOP::Class::make_immutable
# spent 14µs making 1 call to PONAPI::DAO::Request::Delete::meta |
| 28 | 3 | 45µs | 2 | 142µs | # spent 75µs (8+67) within PONAPI::DAO::Request::Delete::BEGIN@28 which was called:
# once (8µs+67µs) by PONAPI::DAO::BEGIN@14 at line 28 # spent 75µs making 1 call to PONAPI::DAO::Request::Delete::BEGIN@28
# spent 67µs making 1 call to Moose::unimport |
| 29 | |||||
| 30 | __END__ |