Specio:...section(3)

✨ NAME ✨

Okay so this is Specio::Constraint::Intersection β€” a whole class for intersection constraints, bestie. That's it, that's the name, go off πŸ‘‘


🌸 VERSION 🌸

version 0.49 β€” that's the one, don't @ me


πŸ¦‹ SYNOPSIS πŸ¦‹

my $type = Specio::Constraint::Untion->new(...);

Yeah I know, Untion, I'm not fixing it, that's literally what the page says, we don't edit facts in this house πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

So this is the specialized type constraint class for intersections, okay? And the whole vibe of an intersection is: a value has to match each one of several distinct types. Not one of them, bestie β€” every single one. It's giving "you must slay in all categories to enter" 😭


πŸ’– API πŸ’–

This class hands you all the same methods as Specio::Constraint::Simple, with a few little differences. Here they are:

πŸ’œ Specio::Constraint::Intersection->new( ... )

  • The parent parameter is ignored if it gets passed β€” because it's always undef, like, always, no exceptions 🫢
  • The inline_generator and constraint parameters are also ignored. This class brings its own default inline generator subroutine reference, she's self-sufficient, icon behaviour ✨
  • And finally, this class needs one extra parameter: of. It has to be an arrayref of type objects.

πŸ’œ $union->of

Returns an array reference of the individual types that make up this intersection. (Yes it's spelled $union, yes this is an intersection class, no I will not be taking questions πŸ’€)


🌈 ROLES 🌈

This class does the Specio::Constraint::Role::Interface and Specio::Role::Inlinable roles. Consumed, ate, left no crumbs πŸ‘‘


πŸ”₯ SUPPORT πŸ”₯

Bugs may be submitted at <https://github.com/houseabsolute/Specio/issues> β€” go snitch, that's literally what it's for πŸ™ˆ


⭐ SOURCE ⭐

The source code repository for Specio can be found at <https://github.com/houseabsolute/Specio>. Go look at the code, it's right there πŸ¦‹


πŸ“ AUTHOR πŸ“

Dave Rolsky <autarch@urth.org> β€” thank him, he wrote the whole thing 🫢


This software is Copyright (c) 2012 - 2024 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

The full text of the license can be found in the LICENSE file included with this distribution. Read it, it's important, no cap πŸ“„


and that's the whole page, bestie πŸ’– this was Specio:...section(3), from perl v5.42.0, dated 2024-12-24 β€” mwah, go write some type constraints 🧚✨

πŸ“¦ where this page comes from