Mo::Features(3)

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

🌸 Mo Features 🌸

okay bestie, listen β€” this page is all about Mo::Features(3), and it's genuinely one of my faves because it's giving glow-up energy for a module that's literally described as absolutely minimal. πŸ’…

Mo is, like, the tiniest little guy. But the way that it lets you just add features whenever you want? Iconic. No cap. You do it like this:

use Mo qw[default builder other features];

And that's it. That loads the modules Mo::default, etc. etc. etc., and then they all just roll up and modify your Mo reality. πŸ¦‹


✨ the feature modules that ship with Mo ✨

Here's the full current lineup, no skips, no cuts:

  • Mo::builder β€” adds the builder feature to has. πŸŽ€
  • Mo::chain β€” adds the chain feature to has.
  • Mo::coerce β€” adds the coerce feature to has.
  • Mo::default β€” adds the default feature to has.
  • Mo::exporter β€” an Exporter for Mo::Inline usage. Heads up though: it only works with inlined Mo. πŸ™ˆ
  • Mo::import β€” a Finalizer for Mo::Inline usage. Same deal: only works with inlined Mo.
  • Mo::is β€” adds the is feature to has.
  • Mo::Moose β€” uses Moose in place of Mo for everything. 😳
  • Mo::Mouse β€” uses Mouse in place of Mo for everything.
  • Mo::option β€” adds the option feature to has.
  • Mo::required β€” adds the required feature to has.
  • Mo::xs β€” uses XS modules to make things faster. πŸ”₯ Requires Class::XSAccessor.

πŸ’œ and there's more (CPAN girlies rise) πŸ’œ

There are also feature modules that ship outside of the Mo distribution. You can go search CPAN yourself, but here's a lil starter list to get you going:

  • Mo::xxx β€” exports the XXX functions for debugging. Handy! ⭐

⚠️ NOTE ⚠️

Okay so do NOT just assume that every feature module is gonna play nice with every other feature module. Sometimes the order you list them in actually changes how they work together. 😭 Read the feature docs, and test your assumptions, bestie. Fr fr.

We keep making more and more things work together, and when they don't, we try to document it. So if you feel like something critical is broken, let us know. See Mo::Hacking. 🫢


mwah, that's a wrap β€” this was Mo::Features(3), brought to you by perl v5.42.0 on 2025-07-25. Stay slay, test your features, and don't forget to read the docs. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from