MooseX...Mooish(3pm)

πŸ“¦
version 0.001 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ¦‹ 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::Mooish
  • MooseX::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.


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 πŸ’–