The constraint name. If a name is not provided, it will be set to __ANON__.
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 "$_".
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 behaves just like coerce, but if the result is not valid
according to $constraint, an error is thrown.
Returns true if the given value passes the constraint for the type.
This is similar to check. However, if the type is valid then the
method returns an explicit undef. If the type is not valid, we call
$self->get_message($value) internally to generate an error
Like check and validate, this method checks whether $value is
valid under the constraint. If it is, it will return true. If it is not,
an exception will be thrown with the results of
Returns the types name, as provided to the constructor.
Returns the types parent, as provided to the constructor, if any.
Returns true if the type has a parent type.
Returns all of the types parents as an list of type constraint objects.
Returns the types constraint, as provided to the constructor.
This generates a method for the given value. If the type does not have
an explicit message, we generate a default message.
Returns true if the type has a message.
Returns the types message as a subroutine reference.
Returns the types Moose::Meta::TypeCoercion object, if one
Returns true if the type has a coercion.
Returns true if this type constraint can be inlined. A type constraint which
subtypes an inlinable constraint and does not add an additional constraint
inherits its parent types inlining.
This returns a new type constraint of the same class using the
provided %options. The parent option will be the current type.
This method exists so that subclasses of this class can override this behavior and change how child types are created.
See BUGS in Moose for details on reporting bugs.
o Stevan Little <firstname.lastname@example.org> o Dave Rolsky <email@example.com> o Jesse Luehrs <firstname.lastname@example.org> o Shawn M Moore <email@example.com> o XXXX XXXXX (Yuval Kogman) <firstname.lastname@example.org> o Karen Etheridge <email@example.com> o Florian Ragwitz <firstname.lastname@example.org> o Hans Dieter Pearcey <email@example.com> o Chris Prather <firstname.lastname@example.org> o Matt S Trout <email@example.com>
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|perl v5.20.3||MOOSE::META::TYPECONSTRAINT (3)||2016-02-16|