Created
October 11, 2009 22:51
-
-
Save stash/207935 to your computer and use it in GitHub Desktop.
Outline for a Moose Intro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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