Moose::...nt::Enum(3)
π Moose::Meta::TypeConstraint::Enum π
okay bestie, gather round, because this is the enum type constraint page from the Moose docs (User Contributed Perl Documentation, if we're being formal, which we are not) π
β¨ NAME β¨
Moose::Meta::TypeConstraint::Enum β it's the type constraint for enumerated values, aka "pick one from this list or perish" π
πΈ VERSION πΈ
version 2.4000 β yes she's got a version, she's a whole package π
π¦ DESCRIPTION π¦
So basically this class represents type constraints that are built off an enumerated list of acceptable values. Like, you give it a list, and it's like "cool, those are the only options, we don't do surprises here." periodt β¨
π INHERITANCE π
Moose::Meta::TypeConstraint::Enum is a subclass of Moose::Meta::TypeConstraint. It's giving nepo baby but in a cute, structural way π«Ά
π METHODS π
π Moose::Meta::TypeConstraint::Enum->new(%options)
This creates a new enum type constraint based on the given %options. new day, new constraint, iconic π
It takes the same options as its parent, with several exceptions:
- It requires an additional option,
values. This should be an array reference containing a list of valid string values. Not optional. She needs the list, bestie π - It automatically sets the parent to the
Strtype. no need to do it yourself, she's got you πΈ - It ignores any provided
constraintoption. The constraint is generated automatically based on the providedvalues. So like, don't even try to hand her a constraint, she's building her own β¨
π $constraint->values
Returns the array reference of acceptable values provided to the constructor. It's the receipts, the list, the whole vibe check π
π $constraint->create_child_type
This returns a new Moose::Meta::TypeConstraint object with the type as its parent.
β οΈ note that it does not return a Moose::Meta::TypeConstraint::Enum object! the way that it's a whole different class... do not get it twisted, bestie π
π BUGS π
See "BUGS" in Moose for details on reporting bugs. go tell the Moose folks, they'll handle it π«Ά
π AUTHORS π
these are the legends, the main characters, the ones who built this:
- Stevan Little
<stevan@cpan.org>π - Dave Rolsky
<autarch@urth.org>π - Jesse Luehrs
<doy@cpan.org>π - Shawn M Moore
<sartak@cpan.org>π - ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman)
<nothingmuch@woobling.org>π - Karen Etheridge
<ether@cpan.org>π - Florian Ragwitz
<rafl@debian.org>π - Hans Dieter Pearcey
<hdp@cpan.org>π - Chris Prather
<chris@prather.org>π - Matt S Trout
<mstrout@cpan.org>π
ate and left no crumbs, fr fr π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and remix, responsibly π§
and that's the whole page, bestie!! β¨ this cutie was rendered by perl v5.42.0 on 2025-07-25, and it lives under Moose::...nt::Enum(3) in the User Contributed Perl Documentation set β mwah, love that for her ππ
π¦ where this page comes from
- fedora 43: perl-Moose 2.4000-4.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms