Specio:...t::Enum(3)
π NAME π
Hey bestie! Welcome to the Specio:...t::Enum(3) page β it's from User Contributed Perl Documentation, and it's all about Specio::Constraint::Enum, a class for constraints that require a string matching one of a set of values. π
πΈ VERSION πΈ
version 0.49
β¨ SYNOPSIS β¨
my $type = Specio::Constraint::Enum->new(...);
print $_, "\n" for @{ $type->values };
π DESCRIPTION π
Okay so this is a specialized type constraint class for types that require a string matching one of a list of values. Slay. β¨
π API π
This class provides all of the same methods as Specio::Constraint::Simple, with a few differences:
π
Specio::Constraint::Enum->new( ... ) π
Here's the tea on new:
parentβ ignored if it's passed, because it's always set to theStrtype.inline_generatorandconstraintβ also ignored. This class provides its own default inline generator subroutine reference.valuesβ this is an additional required parameter. It must be an arrayref of valid strings for the type.
β $enum->values β
Returns an array reference of valid values for the type.
π¦ ROLES π¦
This class does the Specio::Constraint::Role::Interface and Specio::Role::Inlinable roles. Iconic behavior, honestly. π
π SUPPORT π
Bugs may be submitted at https://github.com/houseabsolute/Specio/issues.
π SOURCE π
The source code repository for Specio can be found at https://github.com/houseabsolute/Specio.
π AUTHOR π
Dave Rolsky <autarch@urth.org>
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2012 - 2024 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution.
Byeee! This page came from perl v5.42.0, dated 2024-12-24, for the Specio:...t::Enum(3) manual. πβ¨π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Specio 0.490.0-160000.2.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms