The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 0.34

  • ~~~ more misc. doc. fixes ~~~ ~~ updated copyright dates ~~
  • Moose is now a postmodern object system :)
    • (see the POD for details)
  • <<Role System Refactoring>>
  • this release contains a major reworking and cleanup of the role system
    • 100% backwards compat.
    • Role application now restructured into seperate classes based on type of applicants
    • Role summation (combining of more than one role) is much cleaner and anon-classes are no longer used in this process
    • new Composite role metaclass
    • runtime application of roles to instances is now more efficient and re-uses generated classes when applicable
  • <<New Role composition features>>
    • methods can now be excluded from a given role during composition
      • with 'My::Role' => { excludes => [qw/method1 method2/] };
    • methods can now be aliased to another name (and still retain the original as well)
      • with 'My::Role' => { alias => { method1 => method1_aliased } };
  • <<New Attribute traits>>
    • allows arbitrary roles to be applied to attribute metaobjects to allow better combination of custom attribute features. Docs are coming soon for this feature.
  • <<New Maybe[$type] parameterized type>>
    • added this new type which basically means the value is of $type or it is undef
  • Moose Moose::Role
    • now uses the Moose::Util::apply_all_roles to deal with role application
  • Moose::Util
    • added the &apply_all_roles function
  • Moose::Util::TypeConstraints
    • all optimized type constraint subs are now pulled from the Moose::Util::TypeConstraints::OptimizedConstraints module (thanks to nothingmuch)
    • improved support for the IO:: family of modules within the FileHandle type constraint
  • Moose::Util::TypeConstraints::OptimizedConstraints
    • added this module (see above)
  • Moose::Meta::Class
    • fixed the &_process_attribute method to be called by &add_attribute, so that the API is now correct
  • Moose::Meta::Method::Accessor
    • fixed bug when passing a list of values to an accessor would get (incorrectly) ignored. Thanks to Sartak for finding this ;)
      • added tests for this (Sartak again)
  • Moose::Meta::Method::Accessor Moose::Meta::Method::Constructor Moose::Meta::Attribute Moose::Meta::TypeConstraint Moose::Meta::TypeCoercion
    • lots of cleanup of such things as:
      • generated methods
      • type constraint handling
      • error handling/messages (thanks to nothingmuch)
  • Moose::Meta::TypeConstraint::Parameterizable
    • added this module to support the refactor in Moose::Meta::TypeConstraint::Parameterized
  • Moose::Meta::TypeConstraint::Parameterized
    • refactored how these types are handled so they are more generic and not confined to ArrayRef and HashRef only
  • t/
    • shortened some file names for better VMS support (RT #32381)

Documentation

How to cook a Moose
Frequently asked questions about Moose
The (always classic) Point example.
The meta-attribute example
A simple BankAccount example
A lazy BinaryTree example
Subtypes, and modeling a simple Company class hierarchy
More subtypes, coercion in a Request class
The Moose::Role example
The augment/inner example
Snippets of code for using Types and Type Constraints
For when things go wrong with Moose
Formal spec for Role behavior

Modules

A postmodern object system for Perl 5
The Moose attribute metaclass
The Moose metaclass
The Moose Instance metaclass
A Moose Method metaclass
A Moose Method metaclass for accessors
Method Meta Object for constructors
Method Meta Object for destructors
A Moose Method metaclass for overriden methods
The Moose Role metaclass
An object to represent the set of roles
A Moose Method metaclass for Roles
A Moose metaclass for required methods in Roles
The Moose Type Coercion metaclass
The Moose Type Coercion metaclass for Unions
The Moose Type Constraint metaclass
Class/TypeConstraint parallel hierarchy
Higher Order type constraints for Moose
Higher Order type constraints for Moose
registry for type constraints
A union of Moose type constraints
The base object for Moose
The Moose Role
Utilities for working with Moose classes
Type constraint system for Moose
Optimized constraint bodies for various moose types
Test functions for Moose specific features
syntactic sugar to make Moose one-liners easier