Moo is an extremely light-weight Object Orientation system. It allows one to concisely define objects and roles with a convenient syntax that avoids the details of Perl's object system. Moo contains a subset of Moose and is optimised for rapid startup.
Contains the MooX and MooX::Role packages.
Moo is an extremely light-weight Object Orientation system. It allows one to concisely define objects and roles with a convenient syntax that avoids the details of Perl's object system. Moo contains a subset of Moose and is optimised for rapid startup.
Moose is a complete object system for Perl 5. It provides keywords for attribute declaration, object construction, inheritance, and maybe more. With Moose, you define your class declaratively, without needing to know about blessed hashrefs, accessor methods, and so on. You can concentrate on the logical structure of your classes, focusing on "what" rather than "how". A class definition with Moose reads like a list of very concise English sentences.
This package eases the writing of command line utilities, accepting commands and subcommands and so on. These commands can form a tree, which is mirrored in the package structure. On invocation, each command along the path through the tree (starting from the top-level command through to the most specific one) is instantiated.
MooX::late does the following:
Supports isa => $stringytype
Supports does => $rolename
Supports lazy_build => 1
Exports blessed and confess functions to your namespace.
Handles certain attribute traits Currently Hash, Array and Code are supported. This feature requires MooX::HandlesVia.
This package lets you declare types using short names, but behind the scenes it namespaces all your type declarations, effectively prevent name clashes between packages.
Create a command line tool with your Mo, Moo, Moose objects. You have an option
keyword to replace the usual has
to explicitly use your attribute on the command line. The option
keyword takes additional parameters and uses Getopt::Long::Descriptive
to generate a command line tool.
This is a Moose role which provides an alternate constructor for creating objects using parameters passed in from the command line.
MooX::HandlesVia
is an extension of Moo's handles
attribute functionality. It provides a means of proxying functionality from an external class to the given attribute.
MooseX::NonMoose allows for easily subclassing non-Moose classes with Moose, taking care of the details connected with doing this, such as setting up proper inheritance from Moose::Object and installing (and inlining, at make_immutable time) a constructor that makes sure things like BUILD methods are called. It tries to be as non-intrusive as possible.
This module is a helper for easily finding configuration file locations. This information can be used to find a suitable place for installing configuration files or for finding any piece of settings.
This module is intended to easily load initialization values for attributes on object construction from an appropriate config file. The building is done in MooX::ConfigFromFile::Role
---using MooX::ConfigFromFile
ensures that the role is applied.
MooX::Types::MooseLike provides a possibility to build your own set of Moose-like types. These custom types can then be used to describe fields in Moo-based classes.
MooseX::MarkAsMethods allows one to easily mark certain functions as Moose methods. This will allow other packages such as namespace::autoclean to operate without blowing away your overloads. After using MooseX::MarkAsMethods your overloads will be recognized by Class::MOP as being methods, and class extension as well as composition from roles with overloads will "just work".
This module packages several Moose::Util::TypeConstraints with coercions, designed to work with the DateTime suite of objects.
This module fills a gap in Moose by adding method parameter validation to Moose.
Loading MooX::StrictConstructor
makes your constructors "strict". If your constructor is called with an attribute init argument that your class does not declare, then it dies.
This module allows code attributes of methods to be introspected using Moose meta method objects.
Adds support on top of MooseX::Traits for class precedence search for traits and some extra attributes.
This module applies roles to make a subclass instead of manually setting up a subclass.
Simply loading this module makes your constructors "strict". If your constructor is called with an attribute init argument that your class does not declare, then it calls Moose->throw_error().
Because Moose roles serve many different masters, they usually provide only the least common denominator of functionality. To empower roles further, more configurability than -alias and -excludes is required. Perhaps your role needs to know which method to call when it is done processing, or what default value to use for its url attribute. Parameterized roles offer a solution to these (and other) kinds of problems.
MooseX::Types::LoadableClass provides a ClassName type constraint with coercion to load the class.