<span class="incremental">with 'HasSize';
-has size => ( is => 'ro' );</span></code></pre>
+has size => ( is => 'ro' );</span></code></pre>
</div>
<div class="slide">
package Shirt;
use Moose;
-has size => ( is => 'ro' );
+has size => ( is => 'ro' );
with 'HasSize';</code></pre>
</div>
<pre><code>package Comparison;
use Moose;
-has [ 'left', 'right' ] => (
- is => 'ro',
- <span class="highlight">does => 'Comparable',</span>
+has [ 'left', 'right' ] => (
+ is => 'ro',
+ <span class="highlight">does => 'Comparable',</span>
);
</code></pre>
sub _build_bank {
my $self = shift;
return Bank->new(
- name => 'Spire FCU' );
+ name => 'Spire FCU' );
}</code></pre>
</div>
<pre><code>has shoes => (
is => 'ro',
<span class="highlight">lazy => 1,</span>
- builder => '_build_shoes',
+ builder => '_build_shoes',
);
sub _build_shoes {
<pre><code>package Person;
use Moose;
-has shoe_size => (
+has shoe_size => (
is => 'ro',
<span class="highlight">init_arg => 'foot_size',</span>
);
<pre><code>package Person;
use Moose;
-has shoes => (
+has shoes => (
is => 'ro',
<span class="highlight">init_arg => undef,</span>
);
use MyApp::Types qw( ArrayOfInt );
-has transaction_history => (
- is => 'rw',
- isa => ArrayOfInt,
+has transaction_history => (
+ is => 'rw',
+ isa => ArrayOfInt,
);</code></pre>
</div>
has lungs => (
is => 'ro',
- isa => 'Lungs',
+ isa => 'Lungs',
<span class="highlight">handles => [ 'inhale', 'exhale' ],</span>
);</code></pre>