The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

o - syntactic sugar to make Mo one-liners easier

VERSION

version 0.100

SYNOPSIS

  # create a Mo class on the fly ...
  perl -Mo=Foo -e 'has bar => ( default => sub { q[baz] } ); print Foo->new->bar' # prints baz

DESCRIPTION

o.pm is a simple source filter that adds package $name; use Mo; to the beginning of your script and was entirely created because typing perl -e'package Foo; use Mo; ...' is annoying.

INTERFACE

o provides exactly one method and it's automatically called by perl:

import($package)

Pass a package name to import to be used by the source filter. The package defaults to Class if none is given.

DEPENDENCIES

You will need Filter::Simple and eventually Mo

INCOMPATIBILITIES

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

BUGS

See "BUGS" in Mo for details on reporting bugs.

AUTHOR

Damien "dams" Krotkine

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Damien "dams" Krotkine.

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