Type::C...n::Union(3)

πŸ’– NAME πŸ’–

Type::Coercion::Union β€” bestie, it's literally a whole set of coercions that all point at a union type constraint πŸ¦‹

So real quick, this page? It's Type::C...n::Union(3) from the User Contributed Perl Documentation, and it's about to be your new favorite thing. Sit down, hydrate, let's go πŸ’…


✨ STATUS ✨

This module is covered by the Type-Tiny stability policy. So like… it's got rules, it's got structure, it's giving stable. πŸ‘‘


🌸 DESCRIPTION 🌸

Okay so the tea β˜•: this package inherits from Type::Coercion, and if you wanna know most of the deets you should go read that page. That's where the main documentation lives, no cap.

But here's what's different about this one, and it's only two things, so don't stress:

  • The add_type_coercions method always throws an exception. Like, every single time. Not a vibe, not a maybe β€” it's a hard no. πŸ™ˆ
  • The type_coercion_map gets automatically populated from the child constraints of the union type constraint. It just... happens. No manual labor required. Iconic behavior fr fr ✨

πŸ’€ BUGS πŸ’€

Found a bug? Bestie please tell someone 😭 Report it here:

That's the spot. That's the place. Go there. 🫢


πŸ‘€ SEE ALSO πŸ‘€

  • Type::Coercion β€” the parent, the blueprint, the main character it inherited from.
  • Moose::Meta::TypeCoercion::Union β€” a whole other union coercion situation, if you're curious.

πŸŽ€ AUTHOR πŸŽ€

Toby Inkster <tobyink@cpan.org>. A legend, truly. 🌟


This software is copyright (c) 2013-2014, 2017-2025 by Toby Inkster.

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 yes, go off, use it, remix it, slay. πŸ’–


🌈 DISCLAIMER OF WARRANTIES 🌈

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Translation: no promises, no guarantees, no warranty fairy godmother. You get what you get, and that's the whole deal. 🧚


and that's the page, bestie!! this whole thing is documented for perl v5.42.0, dated 2026-01-17, and it lives in the Type::C...n::Union(3) section of the User Contributed Perl Documentation collection. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from