Skip to content

Instantly share code, notes, and snippets.

@stash
Created October 11, 2009 22:51
Show Gist options
  • Save stash/207935 to your computer and use it in GitHub Desktop.
Save stash/207935 to your computer and use it in GitHub Desktop.
Outline for a Moose Intro
The hard way
* manual constructors and accessors
The declarative way
* Perhaps compare some of the older accessor-generators.
The Moose way
* declarative = good.
Attributes.
* lazy building
* weak refs
Type constraints.
* Basic Type Hierarchy
* enum
* Custom (e.g. "EvenInt")
Type coercions.
Sub-classing
* attribute extension
Method wrappers
* before, around, after
* augment and inner (subclassing only)
* override & super w/i override
Roles
* it's like multiple inheritance, but more powerful
* requires
* wrappers don't conflict; exec in the order of role application
* run-time application
Further Reading
* Class::MOP - the system that Moose is built on, modeled after Perl 6's meta-object system.
* Moose books
^ Optional:
MooseX::Declare ?
The stuff that started out as MooseX::AttributeHandlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment