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:$nameis the exported name of the type, not the declared one. so if you're out here usingSub::Exportersfunctionality 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::MooseExporter
π«Ά 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. π«‘
π COPYRIGHT AND LICENCE π
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
- fedora 43: perl-MooseX-Types 0.51-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms