Schema/uint.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
« Schema/posodd.pm ↑ Summary Schema/uint128.pm »
1 package Sah::Schema::uint;
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 = '2022-10-19'; # DATE
7 1 our $DIST = 'Sah-Schemas-Int'; # DIST
8 1 our $VERSION = '0.077'; # VERSION
9  
10 1 our $schema = [int => {
11 summary => 'Non-negative integer (0, 1, 2, ...)',
12 min => 0,
13 description => <<'_',
14  
15 See also `posint` for integers that start from 1.
16  
17 _
18 examples => [
19 {data=> 0, valid=>1},
20 {data=> 1, valid=>1},
21 {data=>-1, valid=>0},
22 ],
23 links => [
24 {url=>'pm:Types::XSD', summary=>'Equivalent Type::Tiny constraints: NonNegativeInteger'},
25 {url=>'pm:Types::Numbers', summary=>'Equivalent Type::Tiny constraints: PositiveOrZeroInt'},
26 ],
27 }];
28  
29 1 1;
30 # ABSTRACT: Non-negative integer (0, 1, 2, ...)
31  
32 __END__
« Schema/posodd.pm ↑ Summary Schema/uint128.pm »