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

Changes for version 0.45

  • Moose
    • Because of work in Class::MOP 0.56, all XS based functionality is now optional and a Pure Perl version is supplied
      • the CLASS_MOP_NO_XS environment variable can now be used to force non-XS versions to always be used
      • several of the packages have been tweaked to take care of this, mostly we added support for the package_name and name variables in all the Method metaclasses
    • before/around/after method modifiers now support regexp matching of names (thanks to Takatoshi Kitano)
      • tests added for this
      • NOTE: this only works for classes, it is currently not supported in roles, but, ... patches welcome
    • All usage of Carp::confess have been replaced by Carp::croak in the "keyword" functions since the stack trace is usually not helpful
  • Moose::Role
    • All usage of Carp::confess have been replaced by Carp::croak in the "keyword" functions since the stack trace is usually not helpful
    • The 'has' keyword for roles now accepts the same array ref form that Moose.pm does (has [qw/foo bar/] => (is => 'rw', ...))
      • added test for this
  • Moose::Meta::Attribute
    • trigger on a ro-attribute is no longer an error, as it's useful to trigger off of the constructor
  • Moose::Meta::Class
    • added same 'add_package_symbol' fix as in Class::MOP 0.56
  • Moose::Util
    • does_role now handles non-Moose classes more gracefully
      • added tests for this
    • added the 'add_method_modifier' function (thanks to Takatoshi Kitano)
  • Moose::Util::TypeConstraints
    • subtypes of parameterizable types now are themselves parameterizable types
  • Moose::Meta::Method::Constructor
    • fixed bug where trigger was not being called by the inlined immutable constructors
      • added test for this (thanks to Caelum)
  • Moose::Meta::Role::Application::ToInstance
    • now uses the metaclass of the instance (if possible) to create the anon-class (thanks Jonathan Rockway)
  • Moose::Cookbook::Recipe22
    • added the meta-attribute trait recipe (thanks to Sartak)
  • t/
    • fixed hash-ordering test bug that was causing occasional cpantester failures
    • renamed the t/000_recipe/*.t tests to be more descriptive (thanks to Sartak)

Documentation

How to cook a Moose
Frequently asked questions about Moose
The (always classic) Point example.
The Moose::Role example
Advanced Role Composition - method exclusion and aliasing
A simple BankAccount example
The meta-attribute example
The attribute trait example
A lazy BinaryTree example
Subtypes, and modeling a simple Company class hierarchy
More subtypes, coercion in a Request class
The augment/inner example
Making Moose fast with immutable
Builder methods and lazy_build
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
A Moose Method metaclass for augmented methods
Method Meta Object for constructors
Method Meta Object for destructors
A Moose Method metaclass for overriden methods
The Moose Role metaclass
A base class for role application
Compose a role into a class
Compose a role into an instance
Compose a role into another role
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
Type constraint for enumerated values.
Higher Order type constraints for Moose
Higher Order type constraints for Moose
registry for type constraints
Role/TypeConstraint parallel hierarchy
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