Specio::Constraint::Intersection(3) User Contributed Perl Documentation Specio::Constraint::Intersection(3)

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

This is a specialized type constraint class for intersections, which will allow a value which matches each one of several distinct types.

# [API](#API)

This class provides all of the same methods as Specio::Constraint::Simple, with a few differences:

## [Specio::Constraint::Intersection-&gt;new( ... )](#Specio::Constraint::Intersection)

The "parent" parameter is ignored if it passed, as it is always "undef"

The "inline\_generator" and "constraint" parameters are also ignored. This class provides its own default inline generator subroutine reference.

Finally, this class requires an additional parameter, "of". This must be an arrayref of type objects.

## [$union-&gt;of](#$union)

Returns an array reference of the individual types which makes up this intersection.

# [ROLES](#ROLES)

This class does the Specio::Constraint::Role::Interface and Specio::Role::Inlinable roles.

2026-07-17 perl v5.44.0

---

Document: Specio::Constraint::Intersection(3pm) from perl-specio 0.53-r5 (Chainguard OS)
Source: https://github.com/houseabsolute/Specio
