Programming with Moose/Ideology

From Wikibooks, open books for an open world
< Programming with Moose
Jump to: navigation, search

Goal[edit]

Moose's goal is to increase programmer productivity by patching suboptimal syntax and Perl5's lacking object model. Moose goes about this by doing the grunt work for you. Nothing Moose accomplishes is done with source filters.

Speed[edit]

Moose does not endeavor to make your program execute faster, nor does it show much concern for compile time. Most of the speed hit for using Moose occurs at compile time by design.

Base-type independence[edit]

One of the things Moose accomplishes is an abstraction away from Perl5's base data-types. It shouldn't matter if your object is a blessed hash, array, or scalar with Moose and proper practices you can accomplish base-type independence.

The bundle[edit]

A simple use Moose; should be your one-stop-shop for an off-the-shelf OO solution to both Perl's problems and yours. The latest and greatest sandbox for Moose features too esoteric to be included into Moose, or things built with the framework can be found in the MooseX:: namespace. MooseX is loosely reserved for things which build on top of Moose, or things that modify the behavior of Moose. Note however that MooseX is not the appropriate namespace for code which just uses Moose. Some extensions include MooseX::Traits, MooseX::Singleton, MooseX::Types.