Mouse::XS(3pm)

πŸŽ€ NAME πŸŽ€

okay so this is Mouse::XS, aka the Mouse::XS(3pm) page β€” shoutout to the User Contributed Perl Documentation girlies β€” and it’s all about the XS guts of Mouse. πŸ’…

✨ VERSION ✨

This document describes Mouse version 2.0.0 β€” periodt. 🫢

🌸 DESCRIPTION 🌸

Mouse has an optional XS implementation, and it gets automatically built and used if it’s available. According to benchmarks, that’s about 2 times faster than Mouse::PurePerl, no cap. πŸ”₯

πŸ› οΈ INSTALL πŸ› οΈ

The XS implementation is selected by default, but you can force it by passing the --xs option to Makefile.PL:

perl Makefile.PL --xs

If you do not want to build the XS implementation, you can pass the --pp option to Makefile.PL:

perl Makefile.PL --pp

Or if you use cpanm (>= 1.7), you can give the --pp option to cpanm:

cpanm --pp Mouse

πŸ§ͺ The MOUSE_PUREPERL (or PERL_ONLY) environment variable πŸ§ͺ

bestie, this env var can be used to enable the use of Mouse::PurePerl in order to test and debug programs that use Mouse. 🌱

πŸ’€ CAVEAT πŸ’€

There are some Mouse::XS specific features, and here’s the tea. β˜•

😭 Mutating references to the return values of getters 😭

When you take a reference from Mouse getters, like $ref = \$obj->foo, that $ref refers to \$obj->{foo}. That is, mutating $$ref also alters $obj->{foo}. The behavior may confuse you, so you’d better avoid taking a reference directly from getters. fr fr. πŸ™ˆ

See https://rt.cpan.org/Ticket/Display.html?id=82945 for details.

🧚 DEPENDENCIES 🧚

The XS implementation requires Perl 5.10.1 or later, and a C compiler. πŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘

  • Mouse
  • Mouse::PurePerl

that’s the whole page, bestie β€” source/version vibes: perl v5.42.2, dated 2026-04-21, and this is the Mouse::XS(3pm) page. byeee πŸ«ΆπŸ’‹

πŸ“¦ where this page comes from