GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MooseX::Util(3) User Contributed Perl Documentation MooseX::Util(3)

MooseX::Util - Moose::Util extensions

This document describes version 0.006 of MooseX::Util - released June 26, 2015 as part of MooseX-Util.

    use MooseX::Util qw{ ensure_all_roles with_traits };

    # profit!

This is a utility module that handles all of the same functions that Moose::Util handles. In fact, most of the functions exported by this package are simply re-exports from Moose::Util, so you're recommended to read the documentation of that module for a comprehensive view.

However.

We've re-implemented a number of the functions our parent provides, for a variety of reasons. Those functions are documented here.

Given a class and one or more traits, we construct an anonymous class that is a subclass of the given class and consumes the traits given. This is exactly the same as "with_traits" in Moose::Util, except that we use "create_anon_class" in MooseX::Util::Meta::Class to construct the anonymous class, rather than "create_anon_class" in Moose::Meta::Class directly.

Essentially, this means that when we do:

    my $anon_class_name = with_traits('Zombie::Catcher', 'SomeTrait');

For $anon_class_name we get:

    Zombie::Catcher::__ANON__::SERIAL::1

Rather than:

    Moose::Meta::Class::__ANON__::SERIAL::1

This is nice because we have an idea of where the first anonymous class came from, whereas the second one could could be from anywhere.

    # true if "private"
    ... if is_private('_some_name');

Ofttimes we need to determine if a name is considered "private" or not. By convention, method, attribute, and other names are considered private if their first character is an underscore.

While trivial to test for, this allows us to centralize the tests in one place.

Please see those modules/websites for more information related to this module.
Moose::Util

Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/moosex-util/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Chris Weyl <cweyl@alumni.drew.edu>

Please note I do not expect to be gittip'ed or flattr'ed for this work, rather it is simply a very pleasant surprise. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;)

Flattr <https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Fmoosex-util&title=RsrchBoy's%20CPAN%20MooseX-Util&tags=%22RsrchBoy's%20MooseX-Util%20in%20the%20CPAN%22>, Gratipay <https://gratipay.com/RsrchBoy/>, or indulge my Amazon Wishlist <http://bit.ly/rsrchboys-wishlist>... If and *only* if you so desire.

This software is Copyright (c) 2012 by Chris Weyl.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 2.1, February 1999
2015-06-26 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.