Sah/Schema/str_or_aos/arrayified.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Sah/Schema/str_or_aos.pm ↑ Summary Sah/Schema/str_or_aos1.pm »
1 package Sah::Schema::str_or_aos::arrayified;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
6 1 our $DATE = '2024-02-06'; # DATE
7 1 our $DIST = 'Sah-Schemas-Str'; # DIST
8 1 our $VERSION = '0.018'; # VERSION
9  
10 1 our $schema = [aos => {
11 summary => 'String or array (0+ length) of (defined) string, converted to aos',
12 prefilters => [ 'Array::arrayify' ],
13  
14 examples => [
15 {value=>'', valid=>1, validated_value=>['']},
16 {value=>'a', valid=>1, validated_value=>['a']},
17 {value=>{}, valid=>0, summary=>'Not string or array'},
18 {value=>[], valid=>1},
19 {value=>['a'], valid=>1},
20 {value=>['a',undef], valid=>0, summary=>'Has undef element'},
21 {value=>['a',[]], valid=>0, summary=>'Has non-string element'},
22 ],
23  
24 }];
25  
26 1 1;
27 # ABSTRACT:
28  
29 __END__
« Sah/Schema/str_or_aos.pm ↑ Summary Sah/Schema/str_or_aos1.pm »