Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

moosex::meta::typeconstraint::structured5.18(3pm) [mojave man page]

MooseX::Meta::TypeConstraint::Structured(3pm)		User Contributed Perl Documentation	     MooseX::Meta::TypeConstraint::Structured(3pm)

NAME
MooseX::Meta::TypeConstraint::Structured - Structured type constraints. VERSION
version 0.30 DESCRIPTION
A structure is a set of Moose::Meta::TypeConstraint that are 'aggregated' in such a way as that they are all applied to an incoming list of arguments. The idea here is that a Type Constraint could be something like, "An "Int" followed by an "Int" and then a "Str"" and that this could be done so with a declaration like: Tuple[Int,Int,Str]; ## Example syntax So a structure is a list of type constraints (the "Int,Int,Str" in the above example) which are intended to function together. ATTRIBUTES
type_constraints A list of Moose::Meta::TypeConstraint objects. constraint_generator METHODS
validate Messing with validate so that we can support nicer error messages. generate_constraint_for ($type_constraints) Given some type constraints, use them to generate validation rules for an ref of values (to be passed at check time) parameterize (@type_constraints) Given a ref of type constraints, create a structured type. __infer_constraint_generator compile_type_constraint hook into compile_type_constraint so we can set the correct validation rules. create_child_type modifier to make sure we get the constraint_generator is_a_type_of is_subtype_of equals Override the base class behavior. type_constraints_equals Checks to see if the internal type constraints are equal. get_message Give you a better peek into what's causing the error. For now we stringify the incoming deep value with Devel::PartialDump and pass that on to either your custom error message or the default one. In the future we'll try to provide a more complete stack trace of the actual offending elements A subref or closure that contains the way we validate incoming values against a set of type constraints. This returns a CODEREF which generates a suitable constraint generator. Not user servicable, you'll never call this directly. SEE ALSO
The following modules or resources may be of interest. Moose, Moose::Meta::TypeConstraint AUTHORS
o John Napiorkowski <jjnapiork@cpan.org> o Florian Ragwitz <rafl@debian.org> o XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org> o Tomas (t0m) Doran <bobtfish@bobtfish.net> o Robert Sedlacek <rs@474.at> COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by John Napiorkowski. 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.18.2 2013-12-19 MooseX::Meta::TypeConstraint::Structured(3pm)

Check Out this Related Man Page

Moose::Meta::TypeConstraint::Class(3pm) 		User Contributed Perl Documentation		   Moose::Meta::TypeConstraint::Class(3pm)

NAME
Moose::Meta::TypeConstraint::Class - Class/TypeConstraint parallel hierarchy VERSION
version 2.0603 DESCRIPTION
This class represents type constraints for a class. INHERITANCE
"Moose::Meta::TypeConstraint::Class" is a subclass of Moose::Meta::TypeConstraint. METHODS
Moose::Meta::TypeConstraint::Class->new(%options) This creates a new class type constraint based on the given %options. It takes the same options as its parent, with two exceptions. First, it requires an additional option, "class", which is name of the constraint's class. Second, it automatically sets the parent to the "Object" type. The constructor also overrides the hand optimized type constraint with one it creates internally. $constraint->class Returns the class name associated with the constraint. $constraint->parents Returns all the type's parent types, corresponding to its parent classes. $constraint->is_subtype_of($type_name_or_object) If the given type is also a class type, then this checks that the type's class is a subclass of the other type's class. Otherwise it falls back to the implementation in Moose::Meta::TypeConstraint. $constraint->create_child_type(%options) This returns a new Moose::Meta::TypeConstraint object with the type as its parent. Note that it does not return a "Moose::Meta::TypeConstraint::Class" object! $constraint->get_message($value) This is the same as "get_message" in Moose::Meta::TypeConstraint except that it explicitly says "isa" was checked. This is to help users deal with accidentally autovivified type constraints. BUGS
See "BUGS" in Moose for details on reporting bugs. AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for details. COPYRIGHT AND LICENSE
This software is copyright (c) 2012 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.14.2 2012-06-28 Moose::Meta::TypeConstraint::Class(3pm)
Man Page