1Specio::Constraint::UniUosne(r3)Contributed Perl DocumenStpaetciioon::Constraint::Union(3)
2
3
4
6 Specio::Constraint::Union - A class for union constraints
7
9 version 0.48
10
12 my $type = Specio::Constraint::Untion->new(...);
13
15 This is a specialized type constraint class for unions, which will
16 allow a value which matches any one of several distinct types.
17
19 This class provides all of the same methods as
20 Specio::Constraint::Simple, with a few differences:
21
22 Specio::Constraint::Union->new( ... )
23 The "parent" parameter is ignored if it passed, as it is always "undef"
24
25 The "inline_generator" and "constraint" parameters are also ignored.
26 This class provides its own default inline generator subroutine
27 reference.
28
29 Finally, this class requires an additional parameter, "of". This must
30 be an arrayref of type objects.
31
32 $union->of
33 Returns an array reference of the individual types which makes up this
34 union.
35
37 This class does the Specio::Constraint::Role::Interface and
38 Specio::Role::Inlinable roles.
39
41 Bugs may be submitted at
42 <https://github.com/houseabsolute/Specio/issues>.
43
45 The source code repository for Specio can be found at
46 <https://github.com/houseabsolute/Specio>.
47
49 Dave Rolsky <autarch@urth.org>
50
52 This software is Copyright (c) 2012 - 2022 by Dave Rolsky.
53
54 This is free software, licensed under:
55
56 The Artistic License 2.0 (GPL Compatible)
57
58 The full text of the license can be found in the LICENSE file included
59 with this distribution.
60
61
62
63perl v5.38.0 2023-07-21 Specio::Constraint::Union(3)