Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

ouse

Name ouse
Version
Located at /usr/lib/x86_64-linux-gnu/perl5/5.34
File /usr/lib/x86_64-linux-gnu/perl5/5.34/ouse.pm
Is Core No
Search CPAN for this module ouse
Documentation ouse
Module Details ouse


NAME

ouse - syntactic sugar to make Mouse one-liners easier


SYNOPSIS

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


DESCRIPTION

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 the Filter::Simple manpage and eventually Mouse


INCOMPATIBILITIES

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


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 AND LICENSE

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.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026