API/RPC.pm

filter: Statementstmt 100% 42 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 16 / 16 Podpod 100% 7 / 7 totaltotal 100% 65 / 65 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
create
1.0
CRAP 1.0
« API/REST.pm ↑ Summary API/Request/Context.pm »
1 package Catalyst::Controller::DBIC::API::RPC;
2 15 $Catalyst::Controller::DBIC::API::RPC::VERSION = '2.009000';
3 #ABSTRACT: Provides an RPC interface to DBIx::Class
4  
5 15 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶BEGIN { extends 'Catalyst::Controller::DBIC::API'; }
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 15 __PACKAGE__->config(
9 'action' => { object_with_id => { PathPart => 'id' } },
10 'default' => 'application/json',
11 'stash_key' => 'response',
12 'map' => {
13 'application/x-www-form-urlencoded' => 'JSON',
14 'application/json' => 'JSON',
15 },
16 );
17  
18  
19  
20 6 ▶sub create : Chained('objects_no_id') : PathPart('create') : Args(0) {
Subroutine create: called CC=1 SCAR=0.0
Pod documented
21 6 my ( $self, $c ) = @_;
22 6 $self->update_or_create($c);
23 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25  
26 30 ▶sub list : Chained('deserialize') : PathPart('list') : Args(0) {
Subroutine list: called CC=1 SCAR=0.0
Pod documented
27 30 my ( $self, $c ) = @_;
28 30 $self->next::method($c);
29 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31  
32 1 ▶sub item : Chained('object_with_id') : PathPart('') : Args(0) {
Subroutine item: called CC=1 SCAR=0.0
Pod documented
33 1 my ( $self, $c ) = @_;
34 1 $self->next::method($c);
35 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37  
38 7 ▶sub update : Chained('object_with_id') : PathPart('update') : Args(0) {
Subroutine update: called CC=1 SCAR=0.0
Pod documented
39 7 my ( $self, $c ) = @_;
40 7 $self->update_or_create($c);
41 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43  
44 2 ▶sub delete : Chained('object_with_id') : PathPart('delete') : Args(0) {
Subroutine delete: called CC=1 SCAR=0.0
Pod documented
45 2 my ( $self, $c ) = @_;
46 2 $self->next::method($c);
47 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49  
50 1 ▶sub update_bulk : Chained('objects_no_id') : PathPart('update') : Args(0) {
Subroutine update_bulk: called CC=1 SCAR=0.0
Pod documented
51 1 my ( $self, $c ) = @_;
52 1 $self->update_or_create($c);
53 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
54  
55  
56 1 ▶sub delete_bulk : Chained('objects_no_id') : PathPart('delete') : Args(0) {
Subroutine delete_bulk: called CC=1 SCAR=0.0
Pod documented
57 1 my ( $self, $c ) = @_;
58 1 $self->delete($c);
59 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
60  
61 15 1;
62  
63 __END__
« API/REST.pm ↑ Summary API/Request/Context.pm »