# phpman > info > Types::TypeTiny

Types::[TypeTiny(3pm)](https://www.chedong.com/phpMan.php/man/TypeTiny/3pm/markdown)  User Contributed Perl Documentation Types::[TypeTiny(3pm)](https://www.chedong.com/phpMan.php/man/TypeTiny/3pm/markdown)

NAME
       [Types::TypeTiny](https://www.chedong.com/phpMan.php/perldoc/Types%3A%3ATypeTiny/markdown) - type constraints used internally by [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown)

STATUS
       This module is covered by the Type-Tiny stability policy.

DESCRIPTION
       Dogfooding.

       This isn't a real [Type::Library](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ALibrary/markdown)-based type library; that would involve
       too much circularity. But it exports some type constraints which, while
       designed for use within [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown), may be more generally useful.

   Types
       o   StringLike

           Accepts strings and objects overloading stringification.

       o   HashLike[`a]

           Accepts hashrefs and objects overloading hashification.

           Since [Types::TypeTiny](https://www.chedong.com/phpMan.php/perldoc/Types%3A%3ATypeTiny/markdown) 1.012, may be parameterized with another type
           constraint like HashLike[Int].

       o   ArrayLike[`a]

           Accepts arrayrefs and objects overloading arrayfication.

           Since [Types::TypeTiny](https://www.chedong.com/phpMan.php/perldoc/Types%3A%3ATypeTiny/markdown) 1.012, may be parameterized with another type
           constraint like ArrayLike[Int].

       o   CodeLike

           Accepts coderefs and objects overloading codification.

       o   TypeTiny

           Accepts blessed [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown) objects.

       o   _ForeignTypeConstraint

           Any reference which to_TypeTiny recognizes as something that can be
           coerced to a [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown) object.

           Yes, the underscore is included.

   Coercion Functions
       "to_TypeTiny($constraint)"
           Promotes (or "demotes" if you prefer) a [Moose::Meta::TypeConstraint](https://www.chedong.com/phpMan.php/perldoc/Moose%3A%3AMeta%3A%3ATypeConstraint/markdown)
           object to a [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown) object.

           Can also handle [Validation::Class](https://www.chedong.com/phpMan.php/perldoc/Validation%3A%3AClass/markdown) objects. Type constraints built
           from [Validation::Class](https://www.chedong.com/phpMan.php/perldoc/Validation%3A%3AClass/markdown) objects deliberately ignore field filters
           when they do constraint checking (and go to great lengths to do
           so); using filters for coercion only. (The behaviour of "coerce" if
           we don't do that is just too weird!)

           Can also handle any object providing "check" and "get_message"
           methods.  (This includes [Mouse::Meta::TypeConstraint](https://www.chedong.com/phpMan.php/perldoc/Mouse%3A%3AMeta%3A%3ATypeConstraint/markdown) objects.) If
           the object also provides "has_coercion" and "coerce" methods, these
           will be used too.

           Can also handle coderefs (but not blessed coderefs or objects
           overloading "&{}"). Coderefs are expected to return true iff $_
           passes the constraint. If $_ fails the type constraint, they may
           either return false, or die with a helpful error message.

   Methods
       These are implemented so that "[Types::TypeTiny](https://www.chedong.com/phpMan.php/perldoc/Types%3A%3ATypeTiny/markdown)->meta->get_type($foo)"
       works, for rough compatibility with a real [Type::Library](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ALibrary/markdown) type library.

       "meta"
       "type_names"
       "get_type($name)"
       "has_type($name)"
       "coercion_names"
       "get_coercion($name)"
       "has_coercion($name)"

BUGS
       Please report any bugs to
       <<https://github.com/tobyink/p5-type-tiny/issues>>.

SEE ALSO
       [Type::Tiny](https://www.chedong.com/phpMan.php/perldoc/Type%3A%3ATiny/markdown).

AUTHOR
       Toby Inkster <<tobyink@cpan.org>>.

COPYRIGHT AND LICENCE
       This software is copyright (c) 2013-2014, 2017-2021 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.

perl v5.32.1                      2021-08-31              Types::[TypeTiny(3pm)](https://www.chedong.com/phpMan.php/man/TypeTiny/3pm/markdown)
