<div class="slide">
<h1>Introduction to Moose</h1>
- <h2>YAPC 2009</h2>
+ <h2>OSCON 2009</h2>
+ <h2><a href="git://git.moose.perl.org/moose-presentations.git"><tt>git://git.moose.perl.org/moose-presentations.git</tt></a></h2>
</div>
<div class="slide">
</div>
<div class="slide">
- <h1>The Object is Oqaque</h1>
+ <h1>The Object is Opaque</h1>
<ul>
<li>Technically it's a hash reference</li>
<ul>
<li><code>no Moose</code> at the end of a package is a best practice</li>
+ <li>Or <code>namespace::clean</code> at the top</li>
<li>Just do it</li>
</ul>
</div>
<h1>Exercises</h1>
<pre># cd exercises
-$ perl bin/prove -lv t/00-prereq.t
-Missing anything? Install it. (see tarballs/)
+# perl bin/prove -lv t/00-prereq.t
+
+# perl install-moose (if needed)
# perl bin/prove -lv t/01-classes.t
</ul>
</div>
-
<div class="slide">
<h1>Using Types with Attributes</h1>
</div>
<div class="slide">
+ <h1>More Droppings</h1>
+
+ <ul>
+ <li><code>Moose::Util::TypeConstraint</code> also needs cleanup</li>
+ </ul>
+
+ <pre><code>package Person;
+
+use Moose;
+use Moose::Util::TypeConstraints;
+
+subtype ...;
+
+no Moose;
+<span class="highlight">no Moose::Util::TypeConstraints;</span></code></pre>
+</div>
+
+<div class="slide">
<h1>Typed Methods (Low-tech)</h1>
<pre class="medium"><code>package Person;
...
}</code></pre>
+</div>
<div class="slide">
<h1>Typed Methods (High-tech)</h1>
...
}</code></pre>
+</div>
<div class="slide">
<h1>Digression: The Type Registry</h1>
is => 'rw',
isa => ArrayOfInt,
);</code></pre>
+</div>
<div class="slide">
<h1>MooseX::Types</h1>
<li><span class="wrong">One more thing to install and learn</span></li>
<li><span class="wrong">Every name gets types twice (declared and then defined)</span></li>
<li><span class="wrong">Still stuck with strings when referring to class or role names</span></li>
- <li><span class="wrong">Coercion gotcha from earlier still applies to types exported from <code>MooseX::Types::Moose<?code></span></li>
+ <li><span class="wrong">Coercion gotcha from earlier still applies to types exported from <code>MooseX::Types::Moose</code></span></li>
</ul>
</div>