1Mo::importer(3) User Contributed Perl Documentation Mo::importer(3)
2
3
4
6 Mo::importer - Write your own import() extension
7
9 package MyMo;
10
11 sub importer {
12 my ($caller, @args) = @_;
13 ...
14 }
15
16 use Mo qw[importer other features];
17
19 Sometimes you need to add your own logic during Mo::import time. This
20 feature lets you do that by defining your own "importer" subroutine. It
21 will pass you the original caller pkg and the args passed in.
22
24 You need to define the "importer" sub before you "use Mo ...", for
25 (hopefully) obvious reasons. :\
26
27
28
29perl v5.38.0 2023-07-20 Mo::importer(3)