Mo::import(3)
π NAME π
Mo::import β the special import feature for Mo::Inline, and honestly? she's a whole vibe. π
β¨ SYNOPSIS β¨
okay bestie, here's the tea β β this is exactly what it looks like:
package MyMo;
# use Mo qw[default builder import];
package SomeClass;
use MyMo;
has foo => (builder => 'build_foo');
see how import just... sits there at the end of the list? yeah. that's the whole point. she's the main character of the list. π
πΈ DESCRIPTION πΈ
so here's the situation. say you're building your own Mo class for a project (iconic of you, fr fr), and you want it to always come with a default set of features built in. the move? add import to the very end of that list. π
then whenever somebody writes:
use MyMo;
they get the default set, which is default and builder. no cap, that's just what shows up. π¦
but wait, what if you only want default and not the whole bundle? say less:
use MyMo 'default';
and if a particular class wants absolutely no features at all β like, none, zero, empty β you hit her with:
use MyMo '';
lowkey important: that's an empty string '', not nothing. it's a whole mood but it's still a real argument. β¨
π NOTE π
real talk, bestie: this feature is probably not useful, and possibly problematic, outside of Mo::Inline usage. that's the actual documented take. don't say nobody told you. π
π«Ά SEE ALSO π«Ά
nothing listed here, bestie β it's just her. solo era. β
and that's the whole page!! this absolute queen dropped as part of User Contributed Perl Documentation, version perl v5.42.0, dated 2025-07-25, and lives in section 3 as Mo::import(3). go forth and import responsibly πβ¨π
π¦ where this page comes from
- fedora 43: perl-Mo 0.40-28.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms