File Coverage

blib/lib/Sah/Schema/latin_lowercase_alpha.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Sah::Schema::latin_lowercase_alpha;
2              
3 1     1   352332 use strict;
  1         2  
  1         192  
4              
5             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
6             our $DATE = '2024-02-06'; # DATE
7             our $DIST = 'Sah-Schemas-Str'; # DIST
8             our $VERSION = '0.018'; # VERSION
9              
10             our $schema = [str => {
11             summary => 'String containing only zero or more lowercases Latin letters, i.e. a-z',
12             'x.perl.coerce_rules' => ['From_str::to_lower'],
13             match => qr/\A[a-z]*\z/,
14              
15             description => <<'_',
16              
17             Uppercase letters will be coerced to lowercase.
18              
19             _
20             examples => [
21             {value=>'', valid=>1},
22             {value=>'Abz', valid=>1, validated_value=>'abz'},
23             {value=>'foo123', valid=>0, summary=>'Contains numbers'},
24             ],
25              
26             }];
27              
28             1;
29             # ABSTRACT:
30              
31             __END__