The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MooseX::ShortCut::BuildInstance::Types - The BuildInstance type library

DESCRIPTION

This is the package for managing types in the MooseX::ShortCut::BuildInstance package.

Caveat utilitor

All type tests included with this package are considered to be the fixed definition of the types. Any definition not included in the testing is considered flexible.

This module uses Type::Tiny which can, in the background, use Type::Tiny::XS. While in general this is a good thing you will need to make sure that Type::Tiny::XS is version 0.010 or newer since the older ones didn't support the 'Optional' method.

Types

These are checks compatible with the Moose typing system. They are used to see if passed information is compatible with some standard. For mor information see Type::Tiny.

NameSpace

    Test: to see if the name_space fits classical package nameing conventions

    Accepts: $string =~ /^[A-Za-z:]+$/

SuperClassesList

    Test: Checking for an arrayref of classes suitable for inheritance by the built class

    Accepts: an array ref of class names

RolesList

    Test: Checking for an arrayref of role suitable for adding to the built class

    Accepts: an array ref of role names

Attributes

    Test: This is a hash ref of attributes to be added to the built class

    Accepts: the hash keys will be treated as the attribute names and the values will be treated as the attribute settings. Only HashRefs are accepted as values but no testing of the HashRef for suitability as attribute settings is done prior to implementation by $meta->add_attribute( $value ).

Methods

    Test: This is a hash ref of methods to be added to the built class

    Accepts: the hash keys will be treated as the method names and the values will be treated as method refs. Only CodeRefs are accepted as values but no testing of the CodeRefs for suitability as methods is done prior to implementation by $meta->add_method( $value ).

BuildClassDict

    Test: This is a Dictionary ref defining the possible entrys to the 'build_class' function

    Accepts:

            Dict[
                    package => Optional[ NameSpace ],
                    superclasses => Optional[ SuperClassesList ],
                    roles => Optional[ RolesList ],
                    add_roles_in_sequence => Optional[ RolesList ],
                    add_attributes => Optional[ Attributes ],
                    add_methods => Optional[ Methods ],
            ]

SUPPORT

TODO

AUTHOR

Jed Lund
jandrew@cpan.org

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

This software is copyrighted (c) 2014 by Jed Lund

DEPENDENCIES