line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: DAO request - delete |
2
|
|
|
|
|
|
|
package PONAPI::DAO::Request::Delete; |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
48
|
use Moose; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
70
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'PONAPI::DAO::Request'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'PONAPI::DAO::Request::Role::HasID'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub execute { |
11
|
20
|
|
|
20
|
0
|
32
|
my $self = shift; |
12
|
20
|
|
|
|
|
725
|
my $doc = $self->document; |
13
|
|
|
|
|
|
|
|
14
|
20
|
100
|
|
|
|
759
|
if ( $self->is_valid ) { |
15
|
7
|
|
|
|
|
260
|
$self->repository->delete( %{ $self } ); |
|
7
|
|
|
|
|
52
|
|
16
|
4
|
|
|
|
|
264
|
$doc->add_meta( |
17
|
|
|
|
|
|
|
detail => "successfully deleted the resource /" |
18
|
|
|
|
|
|
|
. $self->type |
19
|
|
|
|
|
|
|
. "/" |
20
|
|
|
|
|
|
|
. $self->id |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
17
|
|
|
|
|
108
|
return $self->response(); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
28
|
8
|
|
|
8
|
|
53421
|
no Moose; 1; |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
54
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
PONAPI::DAO::Request::Delete - DAO request - delete |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 0.002006 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHORS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over 4 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item * |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item * |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item * |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
67
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |