Schema/sah/defhash_example.pm

filter: Statementstmt 100% 6 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 6 / 6 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Schema/sah/clause_set.pm ↑ Summary Schema/sah/nondefhash_example.pm »
1 package Sah::Schema::sah::defhash_example;
2  
3 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
4 1 our $DATE = '2021-07-23'; # DATE
5 1 our $DIST = 'Sah-Schemas-Sah'; # DIST
6 1 our $VERSION = '0.9.50.0'; # VERSION
7  
8 1 our $schema = ['defhash' => {
9 'merge.add.keys' => {
10 defhash_v => ['int', {req=>1, is=>1}],
11 v => ['int', {req=>1, is=>1}],
12  
13 value => ['any', {}],
14 valid => ['bool', {req=>1}],
15 },
16 'keys.restrict' => 1,
17 #req_one => ['value', 'data'],
18 req_keys => ['value', 'valid'],
19 }];
20  
21 1 1;
22 # ABSTRACT: Sah schema (array form)
23  
24 __END__
« Schema/sah/clause_set.pm ↑ Summary Schema/sah/nondefhash_example.pm »