Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

MooseX::Types::Util

Name MooseX::Types::Util
Version 0.50
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/MooseX/Types/Util.pm
Is Core No
Search CPAN for this module MooseX::Types::Util
Documentation MooseX::Types::Util
Module Details MooseX::Types::Util


NAME

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


VERSION

version 0.50


DESCRIPTION

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


FUNCTIONS

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

  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 the Sub::Exporter manpages 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

the MooseX::Types::Moose manpage, Exporter


SUPPORT

Bugs may be submitted through the RT bug tracker (or bug-MooseX-Types@rt.cpan.org).

There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/moose.html.

There is also an irc channel available for users of this distribution, at #moose on irc.perl.org.


AUTHOR

Robert ``phaylon'' Sedlacek <rs@474.at>


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.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024