<div class="slide">
<h1>Introduction to Moose</h1>
- <h2>Dave Rolsky</a>
+ <h2>Dave Rolsky</h2>
</div>
<div class="slide">
<ul>
<li>By default, subclasses inherit attribute as-is</li>
- <li>Can change some attribute parameters in subclasses
- <ul>
- <li>default</li>
- <li>builder</li>
- <li>required</li>
- <li>lazy</li>
- <li>others we've not yet covered</li>
- </ul>
- </li>
+ <li>Can change attribute parameters in subclasses</li>
</ul>
</div>
<h1>Subtype Shortcuts - <code>role_type</code></h1>
<pre><code>use Moose::Util::TypeConstraints;
-role_type 'Printable';</coe></pre>
+role_type 'Printable';</code></pre>
<hr />
isa => 'BankAccount',
handles => {
receive_100 =>
- <span class="highlight">[ 'deposit', 100 ]</span>
+ <span class="highlight">[ 'deposit', 100 ]</span>,
give_100 =>
<span class="highlight">[ 'withdraw', 100 ]</span>
},
<ul>
<li><strong>Not comprehensive</strong></li>
- <li>177 MooseX distributions on CPAN as of 09/21/2010</li>
+ <li>188 MooseX distributions on CPAN as of 02/03/2011</li>
<li>Some of them are crap</li>
</ul>
</div>
<h1>MooseX::Declare</h1>
<pre><code>use MooseX::Declare;
-use 5.10.0; # for say
+use 5.12.0; # for say
class Person {
has greeting =>
<li>Still experimental-ish, but seeing more and more use</li>
<li><strong>Not</strong> a source filter!</li>
<li>Hooks into the Perl parser rather than filtering all your code</li>
- <li>But not supported by <code>PPI</code>, <code>perltidy</code>, etc.</li> (yet?)
+ <li>But not supported by <code>PPI</code>, <code>perltidy</code>, etc. (yet?)</li>
</ul>
</div>