AutoCRUD/ConfigDomain.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 5 totaltotal 82.1% 23 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AutoCRUD/View.pm ↑ Summary AutoCRUD/View/Json.pm »
1 package App::AutoCRUD::ConfigDomain;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 1 ▶use Data::Domain 1.05 qw/:all/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7
8 1 ▶sub Config {
Subroutine Config: called CC=1 SCAR=0.0
Pod undocumented
9 1 Struct(
10 app => Struct(
11 name => String(-optional => 1),
12 title => String(-optional => 1),
13 default => Struct(-optional => 1),
14 readonly => Whatever, # used as boolean
15 ),
16 datasources => Struct(
17 -values => List(-min_size => 1,
18 -all => DataSource()),
19 )
20 );
21 }
22
23 1 ▶sub DataSource {
Subroutine DataSource: called CC=1 SCAR=0.0
Pod undocumented
24 1 Struct (
25 dbh => Struct(
26 connect => One_of(
27 List(String(-name => "connect string"),
28 String(-name => "connect username"),
29 String(-name => "connect password"),
30 Struct(-name => "connect options", -optional => 1)),
31 Whatever(-does => 'CODE', -name => "coderef for connection"),
32 String(-name => "eval code for connection"),
33 ),
34 db_catalog => String(-optional => 1),
35 db_schema => String(-optional => 1),
36 ),
37 descr => String(-optional => 1),
38 require => String(-optional => 1),
39 schema_class => String(-optional => 1),
40 tablegroups => List(-all => Tablegroup(), -optional => 1),
41 tables => Struct(-values => List(-all => Table()), -optional => 1),
42 filters => Struct(-optional => 1,
43 -fields => [include => String(-optional => 1),
44 exclude => String(-optional => 1)]),
45 );
46 }
47
48 1 ▶sub Tablegroup {
Subroutine Tablegroup: called CC=1 SCAR=0.0
Pod undocumented
49 1 Struct (
50 name => String,
51 descr => String(-optional => 1),
52 node => Node(-optional => 1),
53 tables => List(-all => String, -min_size => 1),
54 );
55 }
56
57
58
59 1 ▶sub Table {
Subroutine Table: called CC=1 SCAR=0.0
Pod undocumented
60 1 Struct (
61 descr => String(-optional => 1),
62 colgroups => List(
63 -optional => 1,
64 -all => Struct(
65 name => String,
66 descr => String(-optional => 1),
67 node => Node(-optional => 1),
68 columns => List(-all => Struct(
69 name => String,
70 descr => String(-optional => 1),
71 ))
72 )),
73
74 );
75 }
76
77 2 ▶sub Node {
Subroutine Node: called CC=1 SCAR=0.0
Pod undocumented
78 2 Enum(-values => [qw/open closed/], @_);
79 }
80
81 1 1;
82
83 __END__
« AutoCRUD/View.pm ↑ Summary AutoCRUD/View/Json.pm »