X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=moose-class%2Fslides%2Findex.html;h=adf159fe30bf349b099b01d6b87ecaad19794af6;hb=c030f6e8ffa441ca1cfa386722aa5a44b8c2a99a;hp=7759fd3ed919f6f5594aad5db2d8e791d6080212;hpb=62e6bee07fceae46a1910ff3c663e794a08733c8;p=gitmo%2Fmoose-presentations.git diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index 7759fd3..adf159f 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -71,7 +71,8 @@ img#me05 {top: 43px;left: 36px;}
@_
, returns a hash reference of attribute name/value pairsnew
's @_
, returns a hash reference of attribute name/value pairs$class->SUPER::BUILDARGS(@_)
as a fallback!DESTROY
, but Moose makes sure all DEMOLISH
methods in a hierarchy are calledoverride
is another method modifierSUPER::
package Comparison;
use Moose;
-has [ 'left', 'right' ] => (
- is => 'ro',
- does => 'Comparable',
+has [ 'left', 'right' ] => (
+ is => 'ro',
+ does => 'Comparable',
);
@@ -1860,7 +1864,7 @@ has bank => (
sub _build_bank {
my $self = shift;
return Bank->new(
- name => 'Spire FCU' );
+ name => 'Spire FCU' );
}
@@ -1927,7 +1931,7 @@ has shoe_size => (
has shoes => (
is => 'ro',
lazy => 1,
- builder => '_build_shoes',
+ builder => '_build_shoes',
);
sub _build_shoes {
@@ -2000,7 +2004,7 @@ has account => (
package Person;
use Moose;
-has shoe_size => (
+has shoe_size => (
is => 'ro',
init_arg => 'foot_size',
);
@@ -2018,7 +2022,7 @@ print $person->shoe_size;
package Person;
use Moose;
-has shoes => (
+has shoes => (
is => 'ro',
init_arg => undef,
);
@@ -2752,7 +2756,7 @@ duck_type Car => qw( run break_down );
Subtype Shortcuts - enum
use Moose::Util::TypeConstraints;
-enum Color => qw( red blue green ) );
+enum Color => qw( red blue green );