|
NameMo - Micro Objects. Mo is less.Synopsispackage Less; use Mo; extends 'Nothing'; has something => (); Descriptionuse Mo. Mo is less. Much less.Moose is huge. Moose led to Mouse led to Moo led to Mo. M is nothing. Mo is more. Not much. When Moo is more than you need, drop an 'o' and get some Mo. To get just a little Mo from Mo, use "Mo Features" below. Core FeaturesThis is what you get. Nothing Mo.
Mo FeaturesMo is the bare minimum needed for Perl OO. Many times you'll want just a couple more features. Don't worry. Mo's got you covered:use Mo qw'build default builder coerce is required'; has name1 => ( default => sub { 'Joe' } ); has name2 => ( builder => 'name_builder' ); has name3 => ( coerce => sub {$_[0]} ); has name4 => ( is => 'ro' ); has name4 => ( required => 1 ); sub BUILD { my $self = shift; ... } Mo simply loads the feature classes Mo::build, Mo::default, Mo::builder, Mo::coerce, Mo::is and Mo::required. The first one supports BUILD constructing and the other three add their magics to "has". A Mo::Feature module can enhance "new", "extends" and "has", and also add new export subs, or remove existing ones. Features can also be combined for a single accessor. See Mo::Features for a list of all the features and for an explanation of the Feature API.. SeeMo::FeaturesMo::Inlining Mo::Hacking Mo::Design StatusAuthorsIngy döt Net <ingy@cpan.org>Damien 'dams' Krotkine <dams@cpan.org> Matt S. Trout (mst) <mst@shadowcat.co.uk> Christian Walde <walde.christian@googlemail.com> Alessandro Ranellucci (aar/alexrj) <aar@cpan.org> Carlos Lima (priodev) <carlos@cpan.org> Copyright and LicenseCopyright (c) 2011-2013. Ingy döt Net.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
Visit the GSP FreeBSD Man Page Interface. |