1Specio::Constraint::EnuUms(e3r)Contributed Perl DocumentSapteicoino::Constraint::Enum(3)
2
3
4

NAME

6       Specio::Constraint::Enum - A class for constraints which require a
7       string matching one of a set of values
8

VERSION

10       version 0.44
11

SYNOPSIS

13           my $type = Specio::Constraint::Enum->new(...);
14           print $_, "\n" for @{ $type->values };
15

DESCRIPTION

17       This is a specialized type constraint class for types which require a
18       string that matches one of a list of values.
19

API

21       This class provides all of the same methods as
22       Specio::Constraint::Simple, with a few differences:
23
24   Specio::Constraint::Enum->new( ... )
25       The "parent" parameter is ignored if it passed, as it is always set to
26       the "Str" type.
27
28       The "inline_generator" and "constraint" parameters are also ignored.
29       This class provides its own default inline generator subroutine
30       reference.
31
32       Finally, this class requires an additional parameter, "values". This
33       must be a an arrayref of valid strings for the type.
34
35   $enum->values
36       Returns an array reference of valid values for the type.
37

ROLES

39       This class does the Specio::Constraint::Role::Interface and
40       Specio::Role::Inlinable roles.
41

SUPPORT

43       Bugs may be submitted at
44       <https://github.com/houseabsolute/Specio/issues>.
45
46       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
47

SOURCE

49       The source code repository for Specio can be found at
50       <https://github.com/houseabsolute/Specio>.
51

AUTHOR

53       Dave Rolsky <autarch@urth.org>
54
56       This software is Copyright (c) 2012 - 2019 by Dave Rolsky.
57
58       This is free software, licensed under:
59
60         The Artistic License 2.0 (GPL Compatible)
61
62       The full text of the license can be found in the LICENSE file included
63       with this distribution.
64
65
66
67perl v5.30.0                      2019-08-15       Specio::Constraint::Enum(3)
Impressum