The constraint name. If a name is not provided, it will be set to ``__ANON__''.
A "Moose::Meta::TypeConstraint" object which is the parent type for the type being created. This is optional.
This is the subroutine reference that implements the actual constraint check. This defaults to a subroutine which always returns true.
A subroutine reference which is used to generate an error message when the constraint fails. This is optional.
A Moose::Meta::TypeCoercion object representing the coercions to the type. This is optional.
A subroutine which returns a string suitable for inlining this type constraint. It will be called as a method on the type constraint object, and will receive a single additional parameter, a variable name to be tested (usually "$_" or "$_[0]".
This is optional.
A hash reference of variables to close over. The keys are variables names, and the values are references to the variables.
If no coercion can produce a value matching $constraint, the original value is returned.
This method exists so that subclasses of this class can override this behavior and change how child types are created.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.