1Mo::import(3)         User Contributed Perl Documentation        Mo::import(3)
2
3
4

Name

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

Synopsis

9           package MyMo;
10           # use Mo qw[default builder import];
11
12           package SomeClass;
13           use MyMo;
14
15           has foo => (builder => 'build_foo');
16

Description

18       If you are defining your own Mo class for a project, and you want it to
19       always use a default set of features, you should add "import" to the
20       end of the list. Then by calling:
21
22           use MyMo;
23
24       you get the default set: "default" and "builder". If you just want
25       "default", do this:
26
27           use MyMo 'default';
28
29       If you want no features for a particular class, use:
30
31           use MyMo '';
32

Note

34       This feature is probably not useful, and possibly problematic, outside
35       of Mo::Inline usage.
36
37
38
39perl v5.32.0                      2020-07-28                     Mo::import(3)
Impressum