Fix indentation
[gitmo/moose-presentations.git] / moose-class / slides / index.html
index 7351420..ddf2a4d 100644 (file)
@@ -299,7 +299,7 @@ has blog_uri => (
 
   <ul>
     <li>Moose creates <code>new()</code> for you</li>
-    <li>Provide an optional <code>BUIDARGS()</code> and <code>BUILD()</code></li>
+    <li>Provide an optional <code>BUILDARGS()</code> and <code>BUILD()</code></li>
   </ul>
 </div>
 
@@ -964,6 +964,8 @@ sub BUILD {
 
   <ul>
     <li><code>extends</code> is sugar for declaring parent classes</li>
+    <li>Also ensures metaclass compatibility between parent and child</li>
+    <li>Do not <code>use base</code></li>
   </ul>
 
   <pre><code>package Employee;
@@ -1421,7 +1423,7 @@ use Moose;
            -excludes => 'break' },
      'CanBreakdance' =>
          { -alias =>
-               { break => 'break_dance' },
+               { break => 'break_it_down' },
            -excludes => 'break' };</span></code></pre>
 </div>
 
@@ -1434,7 +1436,7 @@ use Moose;
 sub break {
     my $self = shift;
 
-    $self->break_dance;
+    $self->break_it_down;
     if ( rand(1) &lt; 0.5 ) {
         $self->break_bone;
     }
@@ -1759,7 +1761,7 @@ Person->new(); # kaboom</span></code></pre>
 
   <ul>
     <li>Attributes can have defaults</li>
-    <li>Simple non-referecne scalars (number, string)</li>
+    <li>Simple non-reference scalars (number, string)</li>
     <li>Subroutine reference</li>
     <li>A builder method</li>
   </ul>
@@ -2359,7 +2361,7 @@ after clear_password =&gt; sub {
   <h1>Modifier Order</h1>
 
   <ul>
-    <li>Before runs order from last to first</li>
+    <li>Before runs in order from last to first</li>
     <li>After runs in order from first to last</li>
     <li>Around runs in order from last to first</li>
   </ul>
@@ -2853,7 +2855,7 @@ has favorite_numbers =&gt; (
   <h1>More Droppings</h1>
 
   <ul>
-    <li><code>Moose::Util::TypeConstraint</code> also needs cleanup</li>
+    <li><code>Moose::Util::TypeConstraints</code> also needs cleanup</li>
   </ul>
 
   <pre><code>package Person;
@@ -2880,7 +2882,7 @@ sub work {
             \@_,
             tasks    =&gt;
                 { isa    =&gt; 'ArrayRef[Task]',
-                  coerce =&gt;1 },
+                  coerce =&gt; 1 },
             can_rest =&gt;
                 { isa     =&gt; 'Bool',
                   default =&gt; 0 },
@@ -2908,7 +2910,7 @@ sub work {
   <h1>Digression: The Type Registry</h1>
 
   <ul>
-    <li>Types are actually <code>Moose::Meta::TypeConstraint</code> <em>objects</em></li>
+    <li>Types are actually <code>Moose::Meta::TypeConstraints</code> <em>objects</em></li>
     <li>Stored in an interpreter-global registry mapping names to objects</li>
   </ul>
 </div>