Add slide attempting to clarify how Moose creates delegation methods
Dave Rolsky [Fri, 7 Jun 2013 03:54:36 +0000 (22:54 -0500)]
moose-class/slides/index.html

index 46ac36a..e8302e4 100644 (file)
@@ -3138,6 +3138,25 @@ has lungs => (
 </div>
 
 <div class="slide">
+  <h1>Delegation Explained</h1>
+
+<pre><code>package Person;
+
+has lungs =&gt; (
+    is      =&gt; 'ro',
+    isa     =&gt; 'Lungs',
+    <span class="delete">handles =&gt; [ 'inhale', 'exhale' ],</span>
+);
+
+<span class="highlight">sub inhale {
+    my $self = shift;
+    $self-&gt;lungs()-&gt;inhale();
+}
+
+sub exhale { ... }</span></pre></code>
+</div>
+
+<div class="slide">
   <h1>Why Delegation?</h1>
 
   <ul>