1MooseX::Meta::TypeConstUrsaeirntC:o:nSttrriubMcuottouesrdeeXdP:(e:3rMplemt)Dao:c:uTmyepnetCaotnisotnraint::Structured(3pm)
2
3
4
6 MooseX::Meta::TypeConstraint::Structured - Structured type constraints
7
9 version 0.36
10
12 A structure is a set of Moose::Meta::TypeConstraint that are
13 'aggregated' in such a way as that they are all applied to an incoming
14 list of arguments. The idea here is that a Type Constraint could be
15 something like, "An "Int" followed by an "Int" and then a "Str"" and
16 that this could be done so with a declaration like:
17
18 Tuple[Int,Int,Str]; ## Example syntax
19
20 So a structure is a list of type constraints (the "Int,Int,Str" in the
21 above example) which are intended to function together.
22
24 type_constraints
25 A list of Moose::Meta::TypeConstraint objects.
26
27 constraint_generator
29 validate
30 Messing with validate so that we can support nicer error messages.
31
32 generate_constraint_for ($type_constraints)
33 Given some type constraints, use them to generate validation rules for
34 an ref of values (to be passed at check time)
35
36 parameterize (@type_constraints)
37 Given a ref of type constraints, create a structured type.
38
39 __infer_constraint_generator
40 compile_type_constraint
41 hook into compile_type_constraint so we can set the correct validation
42 rules.
43
44 create_child_type
45 modifier to make sure we get the constraint_generator
46
47 is_a_type_of
48 is_subtype_of
49 equals
50 Override the base class behavior.
51
52 type_constraints_equals
53 Checks to see if the internal type constraints are equal.
54
55 get_message
56 Give you a better peek into what's causing the error. For now we
57 stringify the incoming deep value with Devel::PartialDump and pass that
58 on to either your custom error message or the default one. In the
59 future we'll try to provide a more complete stack trace of the actual
60 offending elements
61
62 A subref or closure that contains the way we validate incoming values
63 against a set of type constraints.
64
65 This returns a CODEREF which generates a suitable constraint generator.
66 Not user servicable, you'll never call this directly.
67
69 The following modules or resources may be of interest.
70
71 Moose, Moose::Meta::TypeConstraint
72
74 Bugs may be submitted through the RT bug tracker
75 <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-
76 Structured> (or bug-MooseX-Types-Structured@rt.cpan.org <mailto:bug-
77 MooseX-Types-Structured@rt.cpan.org>).
78
79 There is also a mailing list available for users of this distribution,
80 at <http://lists.perl.org/list/moose.html>.
81
82 There is also an irc channel available for users of this distribution,
83 at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
84
86 • John Napiorkowski <jjnapiork@cpan.org>
87
88 • Florian Ragwitz <rafl@debian.org>
89
90 • XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>
91
92 • Tomas (t0m) Doran <bobtfish@bobtfish.net>
93
94 • Robert Sedlacek <rs@474.at>
95
97 This software is copyright (c) 2008 by John Napiorkowski.
98
99 This is free software; you can redistribute it and/or modify it under
100 the same terms as the Perl 5 programming language system itself.
101
102
103
104perl v5.32.1 M2o0o2s1e-X0:1:-M2e7ta::TypeConstraint::Structured(3pm)