File Coverage

blib/lib/Sah/Schema/uppercase_str.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::uppercase_str;
2              
3 1     1   375663 use strict;
  1         3  
  1         190  
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 uppercase letters',
12             'x.perl.coerce_rules' => ['From_str::to_upper'],
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=>'Abz', valid=>1, validated_value=>'ABZ'},
23             ],
24              
25             }];
26              
27             1;
28             # ABSTRACT:
29              
30             __END__