Ingy döt Net > Mo-0.31 > Mo::import

Download:
Mo-0.31.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.31   Source   Latest Release: Mo-0.38

Name ^

Mo::import - Special import feature for Mo::Inline

Synopsis ^

    package MyMo;
    # use Mo qw[default builder import]; 

    package SomeClass;
    use MyMo;

    has foo => (builder => 'build_foo');

Description ^

If you are defining your own Mo class for a project, and you want it to always use a default set of features, you should add import to the end of the list. Then by calling:

    use MyMo;

you get the default set: default and builder. If you just want default, do this:

    use MyMo 'default';

If you want no features for a particular class, use:

    use MyMo '';

Note ^

This feature is probably not useful, and possibly problematic, outside of Mo::Inline usage.

syntax highlighting: