A Super-fast crash course in Moose for those working from the old OO Perl way of doing things.
- Moose creates the constructor for you. If you want to do 'creation / initialization' of your object, you want to create a sub BUILD - which runs after the arguments to the new are processed (and any defaults are set)
- There are both multiple class inheritance and Roles in Moose.
- Roles are somewhat like 'packaged attributes/methods' that can be added to any other object / class regardless of it's superclass hierarchy. They are different from a class in that they basically define that a class using them 'does something' rather than the class 'is something'
More to come. Write your questions, we'll add answers.
Zmiany w stosunku do poprzedniej wersji. Dodano | Usunięto
