MooseX::Types::Util(3) User Contributed Perl Documentation MooseX::Types::Util(3)

# [DESCRIPTION](#DESCRIPTION)

This package the exportable functions that many parts in MooseX::Types might need.

# [FUNCTIONS](#FUNCTIONS)

## [filter\_tags](#filter_tags)

Takes a list and returns two references. The first is a hash reference containing the tags as keys and the number of their appearance as values. The second is an array reference containing all other elements.

## [has\_available\_type\_export](#has_available_type_export)

```
  TypeConstraint | Undef = has_available_type_export($package, $name);
```

This function allows you to introspect if a given type export is available *at this point in time*. This means that the $package must have imported a type constraint with the name $name, and it must be still in its symbol table.

Two arguments are expected:

$package

The name of the package to introspect.

$name

The name of the type export to introspect.

**Note** that the $name is the *exported* name of the type, not the declared one. This means that if you use Sub::Exporters functionality to rename an import like this:

```
  use MyTypes Str => { -as => 'MyStr' };
```

you would have to introspect this type like this:

```
  has_available_type_export $package, 'MyStr';
```

The return value will be either the type constraint that belongs to the export or an undefined value.

# [SEE ALSO](#SEE_ALSO)

MooseX::Types::Moose, Exporter

2026-04-22 perl v5.42.2

---

Document: MooseX::Types::Util(3pm) from perl-moosex-types 0.51-r1 (Chainguard OS)
Source: https://github.com/moose/MooseX-Types
