Schema/nonposint.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/nonnegint.pm ↑ Summary Schema/odd.pm »
1 package Sah::Schema::nonposint;
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-positive integer (0, -1, -2, ...)',
12 max => 0,
13 examples => [
14 {data=> 0, valid=>1},
15 {data=> 1, valid=>0},
16 {data=>-1, valid=>1},
17 ],
18 links => [
19 {url=>'pm:Types::XSD', summary=>'Equivalent Type::Tiny constraints: NonPositiveInteger'},
20 {url=>'pm:Types::Numbers', summary=>'Equivalent Type::Tiny constraints: NegativeOrZeroInt'},
21 ],
22 }];
23  
24 1 1;
25 # ABSTRACT: Non-positive integer (0, -1, -2, ...)
26  
27 __END__
« Schema/nonnegint.pm ↑ Summary Schema/odd.pm »