o - syntactic sugar to make Mo one-liners easier
version 0.100
# create a Mo class on the fly ...
perl -Mo=Foo -e 'has bar => ( default => sub { q[baz] } ); print Foo->new->bar' # prints baz
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.
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.
You will need Filter::Simple and eventually Mo
None reported. But it is a source filter and might have issues there.
See "BUGS" in Mo for details on reporting bugs.
Damien "dams" Krotkine
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.