Mo::importer - Write your own import() extension
package MyMo; sub importer { my ($caller, @args) = @_; ... } use Mo qw[importer other features];
Sometimes you need to add your own logic during Mo::import time. This feature lets you do that by defining your own importer subroutine. It will pass you the original caller pkg and the args passed in.
importer
You need to define the importer sub before you use Mo ..., for (hopefully) obvious reasons. :\
use Mo ...
To install Mo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mo
CPAN shell
perl -MCPAN -e shell install Mo
For more information on module installation, please visit the detailed CPAN module installation guide.