Type::Tiny::Manual::AllTypes(3pm) | User Contributed Perl Documentation | Type::Tiny::Manual::AllTypes(3pm) |
Type::Tiny::Manual::AllTypes - alphabetical list of all type constraints bundled with Type::Tiny
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>.
Anything. Absolutely anything.
Arrayrefs and objects overloading arrayfication.
Arrayrefs.
Booleans; the numbers or strings "0" and "1", the empty string, or undef.
Similar to Bool, but without coercions, and accepts objects overloading "bool".
Any loaded package name.
Coderefs and objects overloading coderefification.
Coderefs.
An object that DOES a particular role.
An arrayref with a repeating pattern of constraints on its values.
Any value other than undef.
A comma-delimited or other delimited string.
A hashref with constraints on each of its values.
A string from an allowed set of strings.
A 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.)
A reference where Scalar::Util::openhandle returns true, or a blessed object in the IO::Handle class.
Globrefs
Hashrefs and objects overloading hashrefification.
Hashrefs.
An object that can do particular methods.
An object that isa particular class.
A whole number, either positive, negative, or zero.
An integer within a particular numeric range.
Any single item; effectively the same as Any.
A number; relaxed constraint that allows "inf".
A string less than 256 characters long with no line breaks or uppercase letters.
A string with no uppercase letters.
A hashref with a constraint for the values and keys.
When parameterized, the same as its parameter, but also allows undef.
An integer below 0.
A number below 0.
An integer below 0, or 0.
A number below 0, or 0.
A string with more than 0 but less than 256 characters with no line breaks.
A string with more than 0 characters.
The same as LaxNum or StrictNum depending on environment.
A string containing only digits.
A number within a particular numeric range.
A blessed object.
Used in conjunction with Dict, Tuple, or CycleTuple.
An arrayref of arrayrefs, where each of the inner arrayrefs are two values, the first value being a string.
An overloaded object.
A string at least 4 characters long and less than 256 characters long with no line breaks.
An integer above 0.
A number above 0.
An integer above 0, or 0.
An number above 0, or 0.
Any reference.
A regular expression.
Any loaded package name where there is no `new` method.
Scalarrefs.
A string with less than 256 characters with no line breaks.
A single digit number. This includes single digit negative numbers!
Used in conjunction with Dict or Tuple.
A string.
A number; strict constaint.
Strings and objects overloading stringification.
A string with length in a particular range.
A string matching a particular regular expression.
A string at least 4 characters long and less than 256 characters long with no line breaks and at least one non-alphabetic character.
A reference to a tied variable.
An arrayref with constraints on its values.
Blessed objects in the Type::Tiny class.
undef.
A string less than 256 characters long with no line breaks or lowercase letters.
A string with no lowercase letters.
Any non-reference value, including undef.
The module Types::Common incorporates all of the above.
Here's your next step:
Policies related to Type::Tiny development.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2013-2014, 2017-2023 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.
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.
2023-07-21 | perl v5.36.0 |