Mo::import(3)

πŸ“¦
version 0.40 Β· 2 versions
, in fedora 43

πŸ’– 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