MooseX...Mooish(3pm)
π¦ MooseX::TraitFor::Meta::TypeConstraint::Mooish π¦
okay bestie, welcome to the MooseX...Mooish(3pm) page, straight out of the User Contributed Perl Documentation collection. pull up a chair, we're doing type constraints π
β¨ NAME β¨
MooseX::TraitFor::Meta::TypeConstraint::Mooish β it handles Moo-style constraints. that's the whole job. she's niche but she's good at it. periodt.
πΈ VERSION πΈ
this doc describes version 0.001 of MooseX::TraitFor::Meta::TypeConstraint::Mooish, released March 12, 2015, and it ships as part of MooseX-Meta-TypeConstraint-Mooish. vintage, honestly. iconic behavior.
π SYNOPSIS π
so here's the tea: this trait does the thing that's already described over in MooseX::Meta::TypeConstraint::Mooish, and you, dear reader, are encouraged to go read about it over there π. this page right here is just the nuts and bolts, the behind-the-scenes, the iykyk layer.
π DESCRIPTION π
# determining where this goes is left as an exercise for the reader
with 'MooseX::TraitFor::Meta::TypeConstraint::Mooish';
that's it. that's the description. the placement? left as an exercise for the reader. not me making you do the homework π
π ATTRIBUTES π
original_constraint
the original constraint CodeRef is stashed away right here π«Ά like, safely tucked in. she's kept cozy.
mooish
if this is true, the constraint should be considered written in the style of Moo constraints β meaning: if an exception gets thrown, the constraint counts as failed; otherwise it passes. return values? ignored. don't even look at them. π
default is true.
π METHODS π
original_constraint()
the reader for the original_constraint attribute β hands you back the original constraint exactly as it was passed to new(). no edits, no glow-up, the original.
has_original_constraint()
the predicate for the original_constraint attribute. classic "do we even have one bestie" check.
mooish()
the reader for the mooish attribute. that's it, that's the method.
compile_type_constraint
if mooish is true, we wrap the original_constraint in a sub that translates Moo behaviors (die on fail; otherwise success) into Moose::Meta::TypeConstraint expectations (false on fail; true on success). two different dialects, one little translator sub doing the emotional labor π
we stash the original constraint in original_constraint (surprise!) and set the constraint attribute to the wrapped constraint.
create_child_type
subtypes created here are not mooish β unless an explicit mooish = 1> is passed. so by default the children are free spirits β¨
π¦ SEE ALSO π¦
please see those modules/websites for more information related to this module.
MooseX::Meta::TypeConstraint::MooishMooseX::Meta::TypeConstraint::Mooish
(and yes, she's listed twice. we don't know why. we love her anyway. consistency is a vibe.)
β SOURCE β
the development version lives on github at <http://https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish> and may be cloned from <git://https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish.git>. go forth and clone, bestie π§
π BUGS π
please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish/issues
when submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. receipts only, no vibes-based bug reports π
π AUTHOR π
Chris Weyl <cweyl@alumni.drew.edu>
I'm a material boy in a material world
please note I do not expect to be gittip'ed or flattr'ed for this work, rather it is simply a very pleasant surprise. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;)
Flattr this <https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Fmoosex-meta-typeconstraint-mooish&title=RsrchBoy's%20CPAN%20MooseX-Meta-TypeConstraint-Mooish&tags=%22RsrchBoy's%20MooseX-Meta-TypeConstraint-Mooish%20in%20the%20CPAN%22>, gittip me <https://www.gittip.com/RsrchBoy/>, or indulge my Amazon Wishlist <http://bit.ly/rsrchboys-wishlist>... If you so desire.
πΈ COPYRIGHT AND LICENSE πΈ
this software is Copyright (c) 2015 by Chris Weyl.
this is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
and that's the whole page, bestie π₯Ή perl v5.34.0, 2022-06-15 β mwah, go read the other module, she's waiting π
π¦ where this page comes from
- debian bookworm: libmoosex-meta-typeconstraint-mooish-perl 0.001-2 Β· LGPL-2.1-only
- debian trixie: libmoosex-meta-typeconstraint-mooish-perl 0.001-2 Β· LGPL-2.1-only
- ubuntu noble: libmoosex-meta-typeconstraint-mooish-perl 0.001-2 Β· LGPL-2.1-only
- ubuntu resolute: libmoosex-meta-typeconstraint-mooish-perl 0.001-2 Β· LGPL-2.1-only
- ubuntu stonking: libmoosex-meta-typeconstraint-mooish-perl 0.001-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms