1MooseX::Types::Util(3pmU)ser Contributed Perl DocumentatiMoonoseX::Types::Util(3pm)
2
3
4

NAME

6       MooseX::Types::Util - Common utility functions for the distribution
7

VERSION

9       version 0.50
10

DESCRIPTION

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

FUNCTIONS

16   filter_tags
17       Takes a list and returns two references. The first is a hash reference
18       containing the tags as keys and the number of their appearance as
19       values.  The second is an array reference containing all other
20       elements.
21
22   has_available_type_export
23         TypeConstraint | Undef = has_available_type_export($package, $name);
24
25       This function allows you to introspect if a given type export is
26       available at this point in time. This means that the $package must have
27       imported a type constraint with the name $name, and it must be still in
28       its symbol table.
29
30       Two arguments are expected:
31
32       $package
33           The name of the package to introspect.
34
35       $name
36           The name of the type export to introspect.
37
38       Note that the $name is the exported name of the type, not the declared
39       one. This means that if you use Sub::Exporters functionality to rename
40       an import like this:
41
42         use MyTypes Str => { -as => 'MyStr' };
43
44       you would have to introspect this type like this:
45
46         has_available_type_export $package, 'MyStr';
47
48       The return value will be either the type constraint that belongs to the
49       export or an undefined value.
50

SEE ALSO

52       MooseX::Types::Moose, Exporter
53

SUPPORT

55       Bugs may be submitted through the RT bug tracker
56       <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types> (or
57       bug-MooseX-Types@rt.cpan.org <mailto:bug-MooseX-Types@rt.cpan.org>).
58
59       There is also a mailing list available for users of this distribution,
60       at <http://lists.perl.org/list/moose.html>.
61
62       There is also an irc channel available for users of this distribution,
63       at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
64

AUTHOR

66       Robert "phaylon" Sedlacek <rs@474.at>
67
69       This software is copyright (c) 2007 by Robert "phaylon" Sedlacek.
70
71       This is free software; you can redistribute it and/or modify it under
72       the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.36.0                      2023-01-20          MooseX::Types::Util(3pm)
Impressum