MooseX...s::Util(3pm)

πŸ¦‹ MooseX::Types::Util(3pm) β€” like, the User Contributed Perl Documentation one πŸ’…

okay so bestie, welcome to MooseX::Types::Util β€” it's the little helper-homie module from the MooseX::Types family, and honestly? it's giving backstage-pass energy. ✨

🌸 NAME 🌸

MooseX::Types::Util β€” Common utility functions for the distribution. that's it, that's the whole vibe. πŸŽ€

⭐ VERSION ⭐

version 0.51 β€” no cap, that's the number. 🫢

πŸ’– DESCRIPTION πŸ’–

So this package is where all the exportable functions live β€” the ones that, like, many parts in MooseX::Types might need. it's the communal snack drawer of the distribution, everybody's reaching in there. πŸ“

πŸ”₯ FUNCTIONS πŸ”₯

🧚 filter_tags

Takes a list and hands you back two references. periodt. here's the tea:

  • the first is a hash reference β€” tags go in as the keys, and the number of times each one showed up goes in as the values. so it's literally counting your tags for you, iconic. πŸ‘‘
  • the second is an array reference β€” it's holding all the other elements, the ones that weren't tags. they're not forgotten, they're just in the other bucket. πŸ’œ

πŸŽ€ has_available_type_export

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

This one lets you introspect whether a given type export is, like, available at this point in time. and what does that even mean? it means the $package has to have imported a type constraint named $name, and it's gotta still be chilling in its symbol table. if it's not in the symbol table, it's not available β€” sorry babe. 😭

Two arguments are expected:

  • $package β€” the name of the package we're introspecting. that's the one we're snooping on. πŸ™ˆ
  • $name β€” the name of the type export we're introspecting. the thing we're looking for.
⚠️ okay important: $name is the exported name of the type, not the declared one. so if you're out here using Sub::Exporters functionality to rename an import like this:
use MyTypes Str => { -as => 'MyStr' };

then you'd have to introspect this type like this, bestie:

has_available_type_export $package, 'MyStr';

The return value? it's either the type constraint that belongs to the export, or an undefined value. one or the other. slay. πŸ’…

🌈 SEE ALSO 🌈

  • MooseX::Types::Moose
  • Exporter

🫢 SUPPORT 🫢

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types> (or bug-MooseX-Types@rt.cpan.org <mailto:bug-MooseX-Types@rt.cpan.org>). go off, file that bug. πŸ›

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>. join the list, it's a whole community. πŸ’Œ

There is also an irc channel available for users of this distribution, at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>. iykyk. πŸ’¬

πŸ‘‘ AUTHOR πŸ‘‘

Robert "phaylon" Sedlacek <rs@474.at> β€” the main character who made this happen. 🫑

This software is copyright (c) 2007 by Robert "phaylon" Sedlacek.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in, like, actually free. 🌸


okay that's the whole page bestie πŸ’– this was perl v5.42.0, dated 2025-07-25, and the page is MooseX::Types::Util(3pm) β€” go forth and introspect those exports, you gorgeous genius. πŸ¦‹βœ¨

πŸ“¦ where this page comes from