1Specio::Constraint::ParUasmeerteCroinzterdi(b3u)ted PerlSpDeocciuom:e:nCtoantsitornaint::Parameterized(3)
2
3
4
6 Specio::Constraint::Parameterized - A class which represents
7 parameterized constraints
8
10 version 0.46
11
13 my $arrayref = t('ArrayRef');
14
15 my $arrayref_of_int = $arrayref->parameterize( of => t('Int') );
16
17 my $parent = $arrayref_of_int->parent; # returns ArrayRef
18 my $parameter = $arrayref_of_int->parameter; # returns Int
19
21 This class implements the API for parameterized types.
22
24 This class implements the same API as Specio::Constraint::Simple, with
25 a few additions.
26
27 Specio::Constraint::Parameterized->new(...)
28 This class's constructor accepts two additional parameters:
29
30 · parent
31
32 This should be the Specio::Constraint::Parameterizable object from
33 which this object was created.
34
35 This parameter is required.
36
37 · parameter
38
39 This is the type parameter for the parameterized type. This must be
40 an object which does the Specio::Constraint::Role::Interface role.
41
42 This parameter is required.
43
44 $type->parameter
45 Returns the type that was passed to the constructor.
46
48 Bugs may be submitted at
49 <https://github.com/houseabsolute/Specio/issues>.
50
51 I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
52
54 The source code repository for Specio can be found at
55 <https://github.com/houseabsolute/Specio>.
56
58 Dave Rolsky <autarch@urth.org>
59
61 This software is Copyright (c) 2012 - 2020 by Dave Rolsky.
62
63 This is free software, licensed under:
64
65 The Artistic License 2.0 (GPL Compatible)
66
67 The full text of the license can be found in the LICENSE file included
68 with this distribution.
69
70
71
72perl v5.30.1 2020-03-1S4pecio::Constraint::Parameterized(3)