Mouse:...straint(3pm)

🐭✨ Mouse:...straint(3pm) ✨🐭

okay bestie, quick vibe check: this page is from the User Contributed Perl Documentation, and it's giving β€œthe Mouse type constraint metaclass has entered the chat.” We're talking about Mouse::Meta::TypeConstraint, the actual class behind type constraints. No cap.

πŸ’– NAME πŸ’–

Mouse::Meta::TypeConstraint β€” The Mouse Type Constraint metaclass. That's the whole name, periodt.

🌸 VERSION 🌸

This document describes Mouse version v2.6.2. Slay, documented and versioned.

πŸ¦‹ DESCRIPTION πŸ¦‹

This class represents a type constraint, including built-in type constraints, union type constraints, parameterizable/parameterized type constraints, as well as custom type constraints. So yes: built-ins, unions, parameterizable/parameterized ones, and your own custom little guys are all in this class's group chat. Iconic.

πŸ’… METHODS πŸ’…

The whole method lineup, bestie β€” no skipping, no β€œI'll read it later”:

  • Mouse::Meta::TypeConstraint->new(%options) β€” the constructor call, with %options doing its thing πŸŽ€
  • $constraint->name β€” the name method, right here
  • $constraint->parent β€” the parent method, present and accounted for
  • $constraint->constraint β€” the constraint method, yep
  • $constraint->has_coercion β€” the has_coercion method, on the list
  • $constraint->message β€” the message method, not skipped
  • $constraint->is_a_type_of($name or $object) β€” the is_a_type_of call with $name or $object
  • $constraint->coerce($value) β€” the coerce call with $value
  • $constraint->check($value) β€” the check call with $value
  • $constraint->assert_valid($value) β€” the assert_valid call with $value
  • $constraint->get_message($value) β€” the get_message call with $value
  • $constraint->create_child_type(%options) β€” the create_child_type call with %options

🌈 SEE ALSO 🌈

  • Moose::Meta::TypeConstraint β€” the SEE ALSO bestie, exactly as listed. Go peek if you want.

mwah πŸ’‹ this page is your Mouse:...straint(3pm) moment, coming from perl v5.42.2, dated 2026-04-21. Bye bestie, go slay those type constraints 🫢✨

πŸ“¦ where this page comes from