PONAPI/DAO/Request/Delete.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 95.6% 22 / 23 CC 2 SCAR 4.1
CC
2
Cov
100%
execute
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« PONAPI/Builder/Resource/Identifier.pm ↑ Summary PONAPI/DAO/Request/RetrieveAll.pm »
1 # ABSTRACT: DAO request - delete
2 package PONAPI::DAO::Request::Delete;
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::HasID';
9  
10 sub execute {
11 20 ▶ my $self = shift;
Subroutine execute: called CC=2 SCAR=6.9
Pod undocumented
12 20 my $doc = $self->document;
13  
14 20 ▶ if ( $self->is_valid ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->is_valid) 7 13 20
15 7 $self->repository->delete( %{ $self } );
16 4 $doc->add_meta(
17 detail => "successfully deleted the resource /"
18 . $self->type
19 . "/"
20 . $self->id
21 );
22 }
23  
24 17 return $self->response();
25 }
26  
27 8 __PACKAGE__->meta->make_immutable;
28 8 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
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.002012
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
« PONAPI/Builder/Resource/Identifier.pm ↑ Summary PONAPI/DAO/Request/RetrieveAll.pm »