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

Changes for version 0.74

  • Moose::Meta::Role
  • Moose::Meta::Method::Destructor
    • Include stack traces in the deprecation warnings. (Florian Ragwitz)
  • Moose::Meta::Class
    • Removed the long-deprecated _apply_all_roles method.
  • Moose::Meta::TypeContsraint
    • Removed the long-deprecated union method.

Changes for version 0.73_02

  • More deprecations and renamings
    • Moose::Meta::Method::Constructor
      • initialize_body => _initialize_body (this is always called when an object is constructed)
  • Moose::Object
    • The DEMOLISHALL method could throw an exception during global destruction, meaning that your class's DEMOLISH methods would not be properly called. Reported by t0m.
  • Moose::Meta::Method::Destructor
    • Destructor inlining was totally broken by the change to the is_needed method in 0.72_01. Now there is a test for this feature, and it works again.

Changes for version 0.73_01

  • Moose::*
    • Call user_class->meta in fewer places, with the eventual goal of allowing the user to rename or exclude ->meta altogether. Instead uses Class::MOP::class_of. (Sartak)
  • Moose::Meta::Method::Accessor
    • If an attribute had a lazy default, and that value did not pass the attribute's type constraint, it did not get the message from the type constraint, instead using a generic message. Test provided by perigrin.
  • Moose::Util::TypeConstraints
    • Add duck_type keyword. It's sugar over making sure an object can() a list of methods. This is easier than jrockway's suggestion to fork all of CPAN. (perigrin)
      • add tests and documentation (perigrin)
  • Moose
    • Document the fact that init_meta() returns the target class's metaclass object. (hdp)
  • Moose::Cookbook::Extending::Recipe1
  • Moose::Cookbook::Extending::Recipe2
  • Moose::Cookbook::Extending::Recipe3
  • Moose::Cookbook::Extending::Recipe4
    • Make init_meta() examples explicitly return the metaclass and point out this fact. (hdp)
  • Moose::Cookbook::Meta::Recipe6
    • A new recipe, creating a custom meta-method class.
  • Moose::Meta::Class
  • Moose::Meta::Method::Constructor
    • Attribute triggers no longer receive the meta-attribute object as an argument in any circumstance. Previously, triggers called during instance construction were passed the meta-attribute, but triggers called by normal accessors were not. Fixes RT#44429, reported by Mark Swayne. (hdp)
  • Moose::Manual::Attributes
    • Remove references to triggers receving the meta-attribute object as an argument. (hdp)
  • Moose::Cookbook::FAQ
    • Remove recommendation for deprecated Moose::Policy and Moose::Policy::FollowPBP; recommend MooseX::FollowPBP instead. (hdp)
  • Many methods have been renamed with a leading underscore, and a few have been deprecated entirely. The methods with a leading underscore are consider "internals only". People writing subclasses or extensions to Moose should feel free to override them, but they are not for "public" use.
    • Moose::Meta::Class
      • check_metaclass_compatibility => _check_metaclass_compatibility
    • Moose::Meta::Method::Accessor
      • initialize_body => _initialize_body (this is always called when an object is constructed)
      • /(generate_.*_method(?:_inline)?)/ => '_' . $1
    • Moose::Meta::Method::Constructor
      • initialize_body => _initialize_body (this is always called when an object is constructed)
      • /(generate_constructor_method(?:_inline)?)/ => '_' . $1
      • attributes => _attributes (now inherited from parent)
      • meta_instance => _meta_instance (now inherited from parent)
    • Moose::Meta::Role
      • alias_method is deprecated. Use add_method

Documentation

How to cook a Moose
The (always classic) Point example.
Operator overloading, subtypes, and coercion
Using BUILDARGS and BUILD to hook into object construction
Extending a non-Moose base class
A simple BankAccount 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
Moose extension overview
Providing a role for the base object class
Providing an alternate base object class
Acting like Moose.pm and providing sugar Moose-style
Frequently asked questions about Moose
Welcome to the meta world (Why Go Meta?)
A meta-attribute, attributes with labels
Labels implemented via attribute traits
Adding a "table" attribute to the metaclass
The "table" attribute as a metaclass trait
A method metaclass for marking methods public or private
Creating a glob reference meta-instance class
The Moose::Role example
Advanced Role Composition - method exclusion and aliasing
Applying a role to an object instance
Restricted "keywords" in Moose
Snippets of code for using Types and Type Constraints
Expanded into Moose::Manual::BestPractices, so go read that
For when things go wrong with Moose
Expanded into Moose::Manual, so go read that
What is Moose, and how do I use it?
Object attributes with Moose
Get the most out of Moose
Making your classes use Moose (and subclassing)
Moose OO concepts
Object construction (and destruction) with Moose
How to get involved in Moose
Attribute delegation
Important Changes in Moose
The Moose (and Class::MOP) meta API
Moose's method modifiers
Recommended Moose extensions
Roles, an alternative to deep hierarchies and base classes
Moose's type system
Formal spec for Role behavior
Moose idioms in plain old Perl 5 without the sugar

Modules

A postmodern object system for Perl 5
Prefer confess
Prefer croak
Carp based error generation for Moose.
make an import() and unimport() just like Moose.pm
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
A Moose Method metaclass for delegation methods
Method Meta Object for destructors
A Moose Method metaclass for overridden 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.
Type constraints which can take a parameter (ArrayRef)
Type constraints with a bound parameter (ArrayRef[Int])
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
Apply roles to any metaclass, as well as the object base class
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

Provides

in lib/Moose/Meta/Attribute.pm