ouse(3pm)

ouse3pm

Syntactic sugar to make mouse one-liners easier

Usage

  # 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'

Overview

ouse.pm is a simple source filter that adds "package $name; use Mouse;" to the beginning of your script and was entirely created because typing perl "-e'package Foo; use Mouse; ...'" was annoying me... especially after getting used to having "-Moose" for Moose.

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.

Dependencies

You will need Filter::Simple and eventually Mouse

Incompatibilities

None reported. But it is a source filter and might have issues there.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 8 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

Author

For all intents and purposes, blame:

Chris Prather "<[email protected]>"

...who wrote oose.pm, which was adapted for use by Mouse by:

Ricardo SIGNES "<[email protected]>"

From perl-mouse 2.6.2-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.