1Specio::Constraint::StrUuscetrurCeodn(t3r)ibuted Perl DoScpuemceinot:a:tCioonnstraint::Structured(3)
2
3
4
6 Specio::Constraint::Structured - A class which represents structured
7 constraints
8
10 version 0.46
11
13 my $tuple = t('Tuple');
14
15 my $tuple_of_str_int = $tuple->parameterize( of => [ t('Str'), t('Int') ] );
16
17 my $parent = $tuple_of_str_int->parent; # returns Tuple
18 my $parameters = $arrayref_of_int->parameters; # returns { of => [ t('Str'), t('Int') ] }
19
21 This class implements the API for structured types.
22
24 This class implements the same API as Specio::Constraint::Simple, with
25 a few additions.
26
27 Specio::Constraint::Structured->new(...)
28 This class's constructor accepts two additional parameters:
29
30 · parent
31
32 This should be the Specio::Constraint::Structurable object from
33 which this object was created.
34
35 This parameter is required.
36
37 · parameters
38
39 This is the hashref of parameters for the structured type. These
40 are the parameters returned by the "Structurable" type's
41 "parameterization_args_builder". The exact form of this hashref
42 will vary for each structured type.
43
44 This parameter is required.
45
46 $type->parameters
47 Returns the hashref that was passed to the constructor.
48
50 Bugs may be submitted at
51 <https://github.com/houseabsolute/Specio/issues>.
52
53 I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
54
56 The source code repository for Specio can be found at
57 <https://github.com/houseabsolute/Specio>.
58
60 Dave Rolsky <autarch@urth.org>
61
63 This software is Copyright (c) 2012 - 2020 by Dave Rolsky.
64
65 This is free software, licensed under:
66
67 The Artistic License 2.0 (GPL Compatible)
68
69 The full text of the license can be found in the LICENSE file included
70 with this distribution.
71
72
73
74perl v5.30.1 2020-03-14 Specio::Constraint::Structured(3)