ouse(3pm)

🌸 NAME 🌸 β€” ouse(3pm), User Contributed Perl Documentation πŸ’–

okay so ouse is literally syntactic sugar to make Mouse one-liners easier, and this is the User Contributed Perl Documentation page for it. that’s the whole vibe. 🐭✨


✨ SYNOPSIS ✨

bestie, here’s the group-chat demo. first, create a Mouse class on the fly:

# create a Mouse class on the fly ...
perl -Mouse=Foo -e 'has bar => ( is=>q[ro], default => q[baz] ); print Foo->new->bar' # prints baz

# loads an existing class (Mouse or non-Mouse)
# and re-"opens" the package definition to make
# debugging/introspection easier
perl -Mouse=+My::Class -e 'print join ", " => __PACKAGE__->meta->get_method_list'

slay. that’s the energy. πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay so ouse.pm is a simple source filter. what it does is add this exact line to the beginning of your script:

package $name; use Mouse;

and it was entirely created because typing this:

perl "-e'package Foo; use Mouse; ...'"

was annoying me... especially after getting used to having -Moose for Moose. periodt. πŸ˜­πŸ’–


🫢 INTERFACE 🫢

ouse provides exactly one method and it is automatically called by perl:

  • oose->import() β€” pass a package name to import to be used by the source filter.

ngl the raw manpage has a lil rogue > after the method name, like "oose->import()">, which is giving typo energy πŸ™ˆ β€” the method itself is still oose->import().


🧚 DEPENDENCIES 🧚

you will need Filter::Simple and eventually Mouse. that’s the tea. πŸ“


⚠️ INCOMPATIBILITIES ⚠️

none reported. but the way that it is a source filter β€” yeah, it might have issues there. so keep that in mind, bestie. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

  • oose β€” for perl -Moose -e '...'

πŸ‘‘ AUTHOR πŸ‘‘

for all intents and purposes, blame:

  • Chris Prather <perigrin@cpan.org> β€” who wrote oose.pm, which was adapted for use by Mouse by:
  • Ricardo SIGNES <rjbs@cpan.org>

Copyright 2008 Shawn M Moore.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that’s the page, bestie πŸ’– footer vibes: perl v5.42.2, dated 2026-04-21, and it’s the ouse(3pm) page. mwah πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from