Type::Tiny::Manual::AllTypes3pm
Alphabetical list of all type constraints bundled with type::tiny
Manual
The following is a list of type constraints bundled with Type::Tiny, with very brief descriptions. For more information, see the type library's documentation, and the test cases in "t/21-types/".
GitHub link: <https://github.com/tobyink/p5-type-tiny/tree/master/t/21-types>.
- •
-
Anyin Types::StandardAnything. Absolutely anything.
- •
-
ArrayLike[parameterizable] in Types::TypeTinyArrayrefs and objects overloading arrayfication.
- •
-
ArrayRef[parameterizable] in Types::StandardArrayrefs.
- •
-
Bool[has coercion] in Types::StandardBooleans; the numbers or strings "0" and "1", the empty string, or undef.
- •
-
BoolLikein Types::TypeTinySimilar to
Bool, but without coercions, and accepts objects overloading "bool".
- •
-
ClassNamein Types::StandardAny loaded package name.
- •
-
CodeLikein Types::TypeTinyCoderefs and objects overloading coderefification.
- •
-
CodeRefin Types::StandardCoderefs.
- •
-
ConsumerOf[parameterizable] in Types::StandardAn object that DOES a particular role.
- •
-
CycleTuple[parameterizable] in Types::StandardAn arrayref with a repeating pattern of constraints on its values.
- •
-
Definedin Types::StandardAny value other than undef.
- •
-
DelimitedStr[parameterizable] in Types::Common::StringA comma-delimited or other delimited string.
- •
-
Dict[parameterizable] in Types::StandardA hashref with constraints on each of its values.
- •
-
Enum[parameterizable] in Types::StandardA string from an allowed set of strings.
- •
-
_ForeignTypeConstraintin Types::TypeTinyA coderef or an object which Type::Tiny knows how to convert into a Type::Tiny instance. (Yes, the name of this type starts with an underscore.)
- •
-
FileHandlein Types::StandardA reference where Scalar::Util::openhandle returns true, or a blessed object in the IO::Handle class.
- •
-
GlobRefin Types::StandardGlobrefs
- •
-
HashLike[parameterizable] in Types::TypeTinyHashrefs and objects overloading hashrefification.
- •
-
HashRef[parameterizable] in Types::StandardHashrefs.
- •
-
HasMethods[parameterizable] in Types::StandardAn object that can do particular methods.
- •
-
InstanceOf[parameterizable] in Types::StandardAn object that isa particular class.
- •
-
Intin Types::StandardA whole number, either positive, negative, or zero.
- •
-
IntRange[parameterizable] in Types::Common::NumericAn integer within a particular numeric range.
- •
-
Itemin Types::StandardAny single item; effectively the same as
Any.
- •
-
LaxNumin Types::StandardA number; relaxed constraint that allows "inf".
- •
-
LowerCaseSimpleStr[has coercion] in Types::Common::StringA string less than 256 characters long with no line breaks or uppercase letters.
- •
-
LowerCaseStr[has coercion] in Types::Common::StringA string with no uppercase letters.
- •
-
Map[parameterizable] in Types::StandardA hashref with a constraint for the values and keys.
- •
-
Maybe[parameterizable] in Types::StandardWhen parameterized, the same as its parameter, but also allows undef.
- •
-
NegativeIntin Types::Common::NumericAn integer below 0.
- •
-
NegativeNumin Types::Common::NumericA number below 0.
- •
-
NegativeOrZeroIntin Types::Common::NumericAn integer below 0, or 0.
- •
-
NegativeOrZeroNumin Types::Common::NumericA number below 0, or 0.
- •
-
NonEmptySimpleStrin Types::Common::StringA string with more than 0 but less than 256 characters with no line breaks.
- •
-
NonEmptyStrin Types::Common::StringA string with more than 0 characters.
- •
-
Numin Types::StandardThe same as
LaxNumorStrictNumdepending on environment.
- •
-
NumericCode[has coercion] in Types::Common::StringA string containing only digits.
- •
-
NumRange[parameterizable] in Types::Common::NumericA number within a particular numeric range.
- •
-
Objectin Types::StandardA blessed object.
- •
-
Optional[parameterizable] in Types::StandardUsed in conjunction with
Dict,Tuple, orCycleTuple.
- •
-
OptListin Types::StandardAn arrayref of arrayrefs, where each of the inner arrayrefs are two values, the first value being a string.
- •
-
Overload[parameterizable] in Types::StandardAn overloaded object.
- •
-
Passwordin Types::Common::StringA string at least 4 characters long and less than 256 characters long with no line breaks.
- •
-
PositiveIntin Types::Common::NumericAn integer above 0.
- •
-
PositiveNumin Types::Common::NumericA number above 0.
- •
-
PositiveOrZeroIntin Types::Common::NumericAn integer above 0, or 0.
- •
-
PositiveOrZeroNumin Types::Common::NumericAn number above 0, or 0.
- •
-
Ref[parameterizable] in Types::StandardAny reference.
- •
-
RegexpRefin Types::StandardA regular expression.
- •
-
RoleNamein Types::StandardAny loaded package name where there is no `new` method.
- •
-
ScalarRef[parameterizable] in Types::StandardScalarrefs.
- •
-
SimpleStrin Types::Common::StringA string with less than 256 characters with no line breaks.
- •
-
SingleDigitin Types::Common::NumericA single digit number. This includes single digit negative numbers!
- •
-
Slurpy[parameterizable] in Types::StandardUsed in conjunction with Dict or Tuple.
- •
-
Strin Types::StandardA string.
- •
-
StrictNumin Types::StandardA number; strict constraint.
- •
-
StringLikein Types::TypeTinyStrings and objects overloading stringification.
- •
-
StrLength[parameterizable] in Types::Common::StringA string with length in a particular range.
- •
-
StrMatch[parameterizable] in Types::StandardA string matching a particular regular expression.
- •
-
StrongPasswordin Types::Common::StringA string at least 4 characters long and less than 256 characters long with no line breaks and at least one non-alphabetic character.
- •
-
Tied[parameterizable] in Types::StandardA reference to a tied variable.
- •
-
Tuple[parameterizable] in Types::StandardAn arrayref with constraints on its values.
- •
-
TypeTiny[has coercion] in Types::TypeTinyBlessed objects in the Type::Tiny class.
- •
-
Undefin Types::Standardundef.
- •
-
UpperCaseSimpleStr[has coercion] in Types::Common::StringA string less than 256 characters long with no line breaks or lowercase letters.
- •
-
UpperCaseStr[has coercion] in Types::Common::StringA string with no lowercase letters.
- •
-
Valuein Types::StandardAny non-reference value, including undef.
The module Types::Common incorporates all of the above.
Next steps
Here's your next step:
- •
-
Type::Tiny::Manual::Policies
Policies related to Type::Tiny development.
Copyright and licence
This software is copyright (c) 2013-2014, 2017-2025 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Disclaimer of warranties
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.