Sah/Schema/lowercase_str.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/latin_uppercase_letter.pm ↑ Summary Sah/Schema/matcher/str.pm »
1 package Sah::Schema::lowercase_str;
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 = [str => {
11 summary => 'String containing only zero or more lowercase letters',
12 'x.perl.coerce_rules' => ['From_str::to_lower'],
13 description => <<'_',
14  
15 Uppercase letters will be coerced to lowercase.
16  
17 _
18 examples => [
19 {value=>'', valid=>1},
20 {value=>[], valid=>0, summary=>'Not a string'},
21 {value=>'12_3', valid=>1},
22 {value=>'AAbz', valid=>1, validated_value=>'aabz'},
23 ],
24  
25 }];
26  
27 1 1;
28 # ABSTRACT:
29  
30 __END__
« Sah/Schema/latin_uppercase_letter.pm ↑ Summary Sah/Schema/matcher/str.pm »