Type::T...llTypes(3)

πŸ’– Type::Tiny::Manual::AllTypes πŸ’–

okay bestie, so this page lives in the User Contributed Perl Documentation part of your perl manual, and it's the alphabetical list of all type constraints bundled with Type::Tiny. It's basically the full roster, in order, with the tiniest little blurbs. Not me being obsessed with a list of types but here we are πŸ’…


✨ NAME ✨

Type::Tiny::Manual::AllTypes β€” alphabetical list of all type constraints bundled with Type::Tiny. Periodt.


πŸ“š MANUAL πŸ“š

So here's the whole lineup of type constraints that ship with Type::Tiny, each with a very brief description. Want the deep lore? Go read the type library's own documentation, and check out the test cases living in t/21-types/. 🧚

The GitHub link for all that: https://github.com/tobyink/p5-type-tiny/tree/master/t/21-types.

Now, the icons themselves πŸ‘‘:

  • Any β€” in Types::Standard. Anything. Literally anything. Absolutely anything. πŸ’€
  • ArrayLike [parameterizable] β€” in Types::TypeTiny. Arrayrefs, plus objects that overload arrayfication.
  • ArrayRef [parameterizable] β€” in Types::Standard. Arrayrefs.
  • Bool [has coercion] β€” in Types::Standard. Booleans: the numbers or strings "0" and "1", the empty string, or undef.
  • BoolLike β€” in Types::TypeTiny. Basically Bool's chill cousin β€” no coercions, and it accepts objects overloading bool.
  • ClassName β€” in Types::Standard. Any loaded package name.
  • CodeLike β€” in Types::TypeTiny. Coderefs and objects overloading coderefification.
  • CodeRef β€” in Types::Standard. Coderefs.
  • ConsumerOf [parameterizable] β€” in Types::Standard. An object that DOES a particular role.
  • CycleTuple [parameterizable] β€” in Types::Standard. An arrayref whose values follow a repeating pattern of constraints.
  • Defined β€” in Types::Standard. Any value that is not undef.
  • DelimitedStr [parameterizable] β€” in Types::Common::String. A comma-delimited string, or delimited by something else.
  • Dict [parameterizable] β€” in Types::Standard. A hashref with a constraint on each of its values.
  • Enum [parameterizable] β€” in Types::Standard. A string drawn from an allowed set of strings.
  • _ForeignTypeConstraint β€” in Types::TypeTiny. A coderef or an object that Type::Tiny knows how to convert into a Type::Tiny instance. (And yes bestie, the name of this type genuinely starts with an underscore. 🫠)
  • FileHandle β€” in Types::Standard. A reference where Scalar::Util::openhandle returns true, or a blessed object in the IO::Handle class.
  • GlobRef β€” in Types::Standard. Globrefs.
  • HashLike [parameterizable] β€” in Types::TypeTiny. Hashrefs and objects overloading hashrefification.
  • HashRef [parameterizable] β€” in Types::Standard. Hashrefs.
  • HasMethods [parameterizable] β€” in Types::Standard. An object that can do particular methods.
  • InstanceOf [parameterizable] β€” in Types::Standard. An object that isa particular class.
  • Int β€” in Types::Standard. A whole number β€” positive, negative, or zero.
  • IntRange [parameterizable] β€” in Types::Common::Numeric. An integer inside a particular numeric range.
  • Item β€” in Types::Standard. Any single item; effectively the same as Any.
  • LaxNum β€” in Types::Standard. A number, but the relaxed constraint β€” it allows "inf".
  • LowerCaseSimpleStr [has coercion] β€” in Types::Common::String. A string under 256 characters long with no line breaks and no uppercase letters.
  • LowerCaseStr [has coercion] β€” in Types::Common::String. A string with no uppercase letters.
  • Map [parameterizable] β€” in Types::Standard. A hashref with a constraint for the values and the keys.
  • Maybe [parameterizable] β€” in Types::Standard. Once parameterized, it's the same as its parameter, except it also allows undef.
  • NegativeInt β€” in Types::Common::Numeric. An integer below 0.
  • NegativeNum β€” in Types::Common::Numeric. A number below 0.
  • NegativeOrZeroInt β€” in Types::Common::Numeric. An integer below 0, or 0.
  • NegativeOrZeroNum β€” in Types::Common::Numeric. A number below 0, or 0.
  • NonEmptySimpleStr β€” in Types::Common::String. A string with more than 0 but less than 256 characters, and no line breaks.
  • NonEmptyStr β€” in Types::Common::String. A string with more than 0 characters.
  • Num β€” in Types::Standard. The same as LaxNum or StrictNum, depending on the environment.
  • NumericCode [has coercion] β€” in Types::Common::String. A string containing only digits.
  • NumRange [parameterizable] β€” in Types::Common::Numeric. A number inside a particular numeric range.
  • Object β€” in Types::Standard. A blessed object.
  • Optional [parameterizable] β€” in Types::Standard. Used together with Dict, Tuple, or CycleTuple.
  • OptList β€” in Types::Standard. An arrayref of arrayrefs, where each inner arrayref holds two values, the first value being a string.
  • Overload [parameterizable] β€” in Types::Standard. An overloaded object.
  • Password β€” in Types::Common::String. A string at least 4 characters long and less than 256 characters long, with no line breaks.
  • PositiveInt β€” in Types::Common::Numeric. An integer above 0.
  • PositiveNum β€” in Types::Common::Numeric. A number above 0.
  • PositiveOrZeroInt β€” in Types::Common::Numeric. An integer above 0, or 0.
  • PositiveOrZeroNum β€” in Types::Common::Numeric. An number above 0, or 0. (yes, that's the original wording, I'm not touching it 😭)
  • Ref [parameterizable] β€” in Types::Standard. Any reference.
  • RegexpRef β€” in Types::Standard. A regular expression.
  • RoleName β€” in Types::Standard. Any loaded package name where there is no new method.
  • ScalarRef [parameterizable] β€” in Types::Standard. Scalarrefs.
  • SimpleStr β€” in Types::Common::String. A string with less than 256 characters and no line breaks.
  • SingleDigit β€” in Types::Common::Numeric. A single digit number. And this includes single digit negative numbers! 🫢
  • Slurpy [parameterizable] β€” in Types::Standard. Used together with Dict or Tuple.
  • Str β€” in Types::Standard. A string.
  • StrictNum β€” in Types::Standard. A number; the strict constraint.
  • StringLike β€” in Types::TypeTiny. Strings and objects overloading stringification.
  • StrLength [parameterizable] β€” in Types::Common::String. A string whose length falls in a particular range.
  • StrMatch [parameterizable] β€” in Types::Standard. A string matching a particular regular expression.
  • StrongPassword β€” in Types::Common::String. A 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::Standard. A reference to a tied variable.
  • Tuple [parameterizable] β€” in Types::Standard. An arrayref with constraints on its values.
  • TypeTiny [has coercion] β€” in Types::TypeTiny. Blessed objects in the Type::Tiny class.
  • Undef β€” in Types::Standard. undef.
  • UpperCaseSimpleStr [has coercion] β€” in Types::Common::String. A string less than 256 characters long with no line breaks and no lowercase letters.
  • UpperCaseStr [has coercion] β€” in Types::Common::String. A string with no lowercase letters.
  • Value β€” in Types::Standard. Any non-reference value, including undef.

And the plot twist: the module Types::Common incorporates all of the above. Every single one. Ate. ✨


πŸ¦‹ NEXT STEPS πŸ¦‹

Here's your next step, bestie β€” just the one:

  • Type::Tiny::Manual::Policies β€” Policies related to Type::Tiny development.

πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>.


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. Slay.


πŸ’€ 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.

Like, no promises, no cap. πŸ™ˆ


okay that's the whole page!! this came out of the perl v5.42.0 docs and it's dated 2026-01-17 β€” that's the version and date stamp from the footer, folded in all cute like instead of a boring trailing line. go forth and type-check everything, bestie πŸŒˆπŸ’œ

πŸ“¦ where this page comes from