From: Yuval Kogman Date: Tue, 21 Jul 2009 16:00:57 +0000 (-0700) Subject: typo X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78204667be8035e186f28ab73d48f82e6799408d;p=gitmo%2Fmoose-presentations.git typo --- diff --git a/moose-class/exercises/lib/Person.pm b/moose-class/exercises/lib/Person.pm index 9ec8c1b..3f3fc46 100644 --- a/moose-class/exercises/lib/Person.pm +++ b/moose-class/exercises/lib/Person.pm @@ -1,4 +1,30 @@ package Person; +use Moose; + +use namespace::clean -except => "meta"; + +has [qw(first_name last_name)] => ( + is => "rw", + required => 1, +); + +sub full_name { + my $self = shift; + $self->first_name . " " . $self->last_name; +} + +override BUILDARGS => sub { + my ( $self, @args ) = @_; + + if ( @args == 1 and ref $args[0] eq 'ARRAY' ) { + my %p; @p{qw(first_name last_name)} = @{ $args[0] }; + return \%p; + } else { + return super; + } +}; + +__PACKAGE__->meta->make_immutable; 1; diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index 02cc02c..a44f504 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -52,7 +52,8 @@ img#me05 {top: 43px;left: 36px;}

Introduction to Moose

-

YAPC 2009

+

OSCON 2009

+

git://git.moose.perl.org/moose-presentations.git

@@ -940,7 +941,7 @@ sub BUILD {
-

The Object is Oqaque

+

The Object is Opaque