SchemaR/sah/defhash_example.pm

filter: Statementstmt 100% 4 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 4 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« SchemaR/sah/clause_set.pm ↑ Summary SchemaR/sah/nondefhash_example.pm »
1 package Sah::SchemaR::sah::defhash_example;
2  
3 1 our $DATE = '2021-07-23'; # DATE
4 1 our $VERSION = '0.9.50.0'; # VERSION
5  
6 1 our $rschema = ["hash",[{allowed_keys_re=>qr(\A(?:([A-Za-z_][A-Za-z0-9_]*)|([A-Za-z_][A-Za-z0-9_]*)?\.([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*))\z),examples=>[{valid=>1,value=>{}},{valid=>1,value=>{bar=>1,foo=>1}},{summary=>"Invalid property syntax, contains dash",valid=>0,value=>{"foo-bar"=>1}}],keys=>{caption=>["str",{req=>1}],default_lang=>["str",{match=>"\\A[a-z]{2}(_[A-Z]{2})?\\z",req=>1},{}],defhash_v=>["int",{default=>1,is=>1,req=>1}],description=>["str",{req=>1}],name=>["str",{clset=>[{match=>"\\A\\w+\\z","match.err_level"=>"warn","match.err_msg"=>"should be a word"},{max_len=>32,"max_len.err_level"=>"warn","max_len.err_msg"=>"should be short"}],"clset.op"=>"and",req=>1}],summary=>["str",{clset=>[{max_len=>72,"max_len.err_level"=>"warn","max_len.err_msg"=>"should be short"},{match=>qr(\n),"match.err_level"=>"warn","match.err_msg"=>"should only be a single-line text","match.op"=>"not"}],"clset.op"=>"and",req=>1}],tags=>["array",{of=>["any",{of=>[["str",{req=>1}],["hash",{req=>1}]],req=>1}]}],v=>["int",{default=>1,is=>1,req=>1}],valid=>["bool",{req=>1}],value=>["any",{}],x=>["any",{},{}]},"keys.restrict"=>1,req_keys=>["value","valid"],summary=>"DefHash"}],["defhash","hash"]];
7  
8 1 1;
9 # ABSTRACT:
10  
11 __END__
« SchemaR/sah/clause_set.pm ↑ Summary SchemaR/sah/nondefhash_example.pm »