tutorial/lib/MyApp/Controller/User/DBIC.pm

filter: Statementstmt 72.7% 8 / 11 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod n/a totaltotal 52.9% 9 / 17 CC 3 SCAR 22.2
CC
3
Cov
53%
__ANON__
12.0
BEGIN
1.0
CRAP 9.2
« blib/lib/CatalystX/Controller/ExtJS/ImageChooser.pm ↑ Summary example/lib/MyApp/Model/DBIC.pm »
1 #
2 # This file is part of CatalystX-ExtJS
3 #
4 # This software is Copyright (c) 2011 by Moritz Onken.
5 #
6 # This is free software, licensed under:
7 #
8 # The (three-clause) BSD License
9 #
10 package MyApp::Controller::User::DBIC;
11  
12 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 extends 'Catalyst::Controller::DBIC::API::RPC';
14 1 with 'CatalystX::Controller::ExtJS::Direct';
15  
16  
17 1 __PACKAGE__->config(
18 actions => {
19 setup => { PathPart => 'user', Chained => '/' },
20 create => { Direct => undef, DirectArgs => 1 },
21 item => { Direct => undef },
22 update => { Direct => undef, DirectArgs => 1 },
23 delete => { Direct => undef },
24 list => { Direct => undef, DirectArgs => 1 },
25 },
26 class => 'DBIC::User',
27 use_json_boolean => 1,
28 create_requires => [qw(email first last)],
29 return_object => 1,
30 );
31  
32 0 ▶before 'deserialize' => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
33 0 my ($self, $c) = @_;
34 0 ▶ $c->req->data($c->req->data->[0]) if(ref $c->req->data eq 'ARRAY');
Branch: 1 branch
BranchTrueFalseTotal
if ref $c->req->data eq "ARRAY" 0 0 0
35 0 ▶ $c->req->data(undef) unless(ref $c->req->data);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $c->req->data 0 0 0
36 1 };
37  
38  
39 1 1;
« blib/lib/CatalystX/Controller/ExtJS/ImageChooser.pm ↑ Summary example/lib/MyApp/Model/DBIC.pm »