Sah/Schema/tabledef/field_def.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary Sah/Schema/tabledef/table_def.pm »
1 package Sah::Schema::tabledef::field_def;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $schema = [hash => { # XXX should be 'defhash' later
7 summary => 'Field definition',
8 # tmp
9 _prop => {
10 # from defhash
11 v => {},
12 defhash_v => {},
13 name => {},
14 summary => {},
15 description => {},
16 tags => {},
17 x => {},
18  
19 schema => {},
20 pos => {},
21 req => {},
22 sortable => {},
23 filterable => {},
24 },
25  
26 keys => {
27  
28 # XXX from defhash
29 summary => [
30 'str',
31 ],
32  
33 # XXX from defhash
34 description => [
35 'str',
36 ],
37  
38 # XXX from defhash
39 tags => [
40 'array',
41 ],
42  
43 # XXX from defhash
44 x => [
45 'any',
46 ],
47  
48 schema => [
49 'any*' => {of=>['str*','array*']}, # XXX should be 'sah_schema' later
50 ],
51  
52 pos => [
53 'int*',
54 min => 0,
55 # XXX how to check contiguous and unique
56 ],
57  
58 req => [
59 bool => default=>0,
60 ],
61  
62 sortable => [
63 'bool' => default=>1,
64 ],
65  
66 filterable => [
67 'bool' => default=>1,
68 ],
69  
70 },
71 # XXX from defhash
72 'allowed_keys_re' => qr/\A\w+(\.\w+)*\z/,
73 }, {}];
74  
75 1 1;
76 # ABSTRACT:
77  
78 __END__
↑ Summary Sah/Schema/tabledef/table_def.pm »