1Type::Tiny::Union(3)  User Contributed Perl Documentation Type::Tiny::Union(3)
2
3
4

NAME

6       Type::Tiny::Union - union type constraints
7

STATUS

9       This module is covered by the Type-Tiny stability policy.
10

DESCRIPTION

12       Union type constraints.
13
14       This package inherits from Type::Tiny; see that for most documentation.
15       Major differences are listed below:
16
17   Attributes
18       "type_constraints"
19           Arrayref of type constraints.
20
21           When passed to the constructor, if any of the type constraints in
22           the union is itself a union type constraint, this is "exploded"
23           into the new union.
24
25       "constraint"
26           Unlike Type::Tiny, you cannot pass a constraint coderef to the
27           constructor.  Instead rely on the default.
28
29       "inlined"
30           Unlike Type::Tiny, you cannot pass an inlining coderef to the
31           constructor.  Instead rely on the default.
32
33       "parent"
34           Unlike Type::Tiny, you cannot pass an inlining coderef to the
35           constructor.  A parent will instead be automatically calculated.
36
37       "coercion"
38           You probably do not pass this to the constructor. (It's not
39           currently disallowed, as there may be a use for it that I haven't
40           thought of.)
41
42           The auto-generated default will be a Type::Coercion::Union object.
43
44   Methods
45       "find_type_for($value)"
46           Returns the first individual type constraint in the union which
47           $value passes.
48
49   Overloading
50       ยท   Arrayrefification calls "type_constraints".
51

BUGS

53       Please report any bugs to
54       <http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny>.
55

SEE ALSO

57       Type::Tiny::Manual.
58
59       Type::Tiny.
60

AUTHOR

62       Toby Inkster <tobyink@cpan.org>.
63
65       This software is copyright (c) 2013-2014, 2017-2019 by Toby Inkster.
66
67       This is free software; you can redistribute it and/or modify it under
68       the same terms as the Perl 5 programming language system itself.
69

DISCLAIMER OF WARRANTIES

71       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
72       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
73       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
74
75
76
77perl v5.30.0                      2019-07-26              Type::Tiny::Union(3)
Impressum