---
name: "Coat::Meta::TypeConstraint"
section: "3pm"
platform: "linux"
package: "libcoat-perl"
version: "0.334-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Coat::Meta::TypeConstraint"
---

# Coat::Meta::TypeConstraint(3pm)

The Coat Type Constraint metaclass

## NAME

Coat:Meta::TypeConstraint - The Coat Type Constraint metaclass

## DESCRIPTION

For the most part, the only time you will ever encounter an instance of this class is if you are doing some serious deep introspection. This API should not be considered final, but it is **highly unlikely** that this will matter to a regular Coat user.

## METHODS

- **new**

  Constructor

- **coerce ($value)**

  This will apply the type-coercion if applicable.

- **validate ($value)**

  If the `$value` passes the constraint, `"undef"` will be returned. If the `$value` does **not** pass the constraint, then the `"message"` will be used to construct a custom error message.

- **has\_coercion** Return true if coercion has been defined, false otherwise.

  ## AUTHOR

Alexis Sukrieh \<sukria@sukria.net\> ; based on the work done by Stevan Little \<stevan@iinteractive.com\>  on Moose::Meta::TypeConstraint

## COPYRIGHT AND LICENSE

Copyright 2006-2008 by Edenware - Alexis Sukrieh

\<http://www.edenware.fr\> - \<http://www.sukria.net\>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
