X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=moose-class%2Fslides%2Findex.html;h=b3f57f681376337f550f7a3624631f0a305fcc1c;hb=7f7e655a677ae4e66c2bf208a9898c796a12e779;hp=a21e61b5b5c94858d032c1ba74cf51758a59f768;hpb=f865e3aea930e190c8908d8f599263766a7330f9;p=gitmo%2Fmoose-presentations.git diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index a21e61b..b3f57f6 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -950,10 +950,10 @@ sub BUILD {

Object Construction a la Moose

-
Person->new(@_)
+
Person->new(@args)
    -
  1. Calls Person->BUILDARGS(@_) to turn @_ into a hashref
  2. +
  3. Calls Person->BUILDARGS(@args) to turn @args into a hashref
  4. Blesses a reference
  5. Populates attributes based on the hashref from #1
  6. Calls $new_object->BUILDALL($constructor_args) @@ -1032,7 +1032,7 @@ extends 'LWP';
  7. No DEMOLISH()
  8. -
  9. But see MooseX::NonMoose for a workaround
  10. +
  11. But MooseX::NonMoose fixes all of this
@@ -1155,8 +1155,8 @@ Person->can('extends');

Cleaning Up Moose Droppings

package Person;
-use namespace::autoclean;
 use Moose;
+use namespace::autoclean;
 
 ...
 
@@ -1487,34 +1487,6 @@ Integer->does('Comparable'); # also true!
-

Name Conflicts Between Roles

- -
package HasSubProcess;
-use Moose::Role;
-
-sub execute { ... }
-
-package Killer;
-use Moose::Role;
-
-with 'HasSubProcess';
-
-sub execute { ... }
-
- -
-

Delayed Conflict

- -
package SysadminAssassin;
-with 'Killer';
- - -
- -

Roles as Interfaces

+
  • When using modifiers in a role, require the modified method
  • @@ -2852,7 +2824,7 @@ sub work {

    Digression: The Type Registry

    @@ -3705,7 +3677,7 @@ with HasCollection => { type => 'Int' };
  • mailing list - moose@perl.org
  • Slides and exercises are in Moose's git repo:
    - git://jules.scsys.co.uk/gitmo/moose-presentations
  • + git://git.moose.perl.org/moose-presentations.git