| 1 | package Sah::Schema::posint; | ||
| 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 => 'Positive integer (1, 2, ...)', | ||
| 12 | min => 1, | ||
| 13 | description => <<'_', | ||
| 14 | |||
| 15 | Zero is not included in this schema because zero is neither positive nor | ||
| 16 | negative. See also `uint` for integers that start from 0. | ||
| 17 | |||
| 18 | _ | ||
| 19 | examples => [ | ||
| 20 | {data=> 1, valid=>1}, | ||
| 21 | {data=> 0, valid=>0}, | ||
| 22 | {data=>-1, valid=>0}, | ||
| 23 | ], | ||
| 24 | links => [ | ||
| 25 | {url=>'pm:Types::XSD', summary=>'Equivalent Type::Tiny constraints: PositiveInteger'}, | ||
| 26 | {url=>'pm:Types::Numbers', summary=>'Equivalent Type::Tiny constraints: PositiveInt'}, | ||
| 27 | ], | ||
| 28 | }]; | ||
| 29 | |||
| 30 | 1 | 1; | |
| 31 | # ABSTRACT: Positive integer (1, 2, ...) | ||
| 32 | |||
| 33 | __END__ | ||