On Thu Jan 26 06:52:01 2012, arcanez wrote:
Show quoted text> A patch is the quickest/easiest way to get something added.
>
> On Tue Jan 24 17:53:04 2012, XENO wrote:
> > a numeric code should be a String based type (probably SimpleStr even)
> > that only allows [0-9]+ I have many cases of things that are simply
> > numeric codes. including phone numbers zip codes, pin codes, etc
> >
> > want/need a patch?
>
>
Would this be the same as NonNegativeInt?
subtype NonNegativeInt,
as Int,
where { $_ >= 0 },
message { "$_ is not a non-negative integer" };
not to be confused with
subtype PositiveInt,
as Int,
where { $_ > 0 },
message { "$_ is not a positive integer" };
Inlined versions left as an exercise for the reader (or until I get
access to
$work code on Monday).