From: Dave Rolsky Date: Tue, 12 Oct 2010 19:41:20 +0000 (-0500) Subject: Mention that instructions for exercises are in .t file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26973b3b954e508384165b56351a9f57041caf41;p=gitmo%2Fmoose-presentations.git Mention that instructions for exercises are in .t file --- diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index a6cd0be..4bf1c7b 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -897,7 +897,6 @@ use Moose;
  • Accepts a hash or hashref; errors otherwise
  • Provide your own for other cases
  • Always call $class->SUPER::BUILDARGS(@_) as a fallback!
  • -
  • Make sure to pass the original value of @_ to the parent
  • @@ -1055,13 +1054,13 @@ use Moose; extends 'Person'; -override work => sub { +override work => sub { my $self = shift; die "Pay me first" unless $self->got_paid; - super(); -}; + super(); +};
    @@ -1237,6 +1236,8 @@ use Moose; # perl install-moose (if needed) +## Read the instructions in t/01-classes.t + # perl bin/prove -lv t/01-classes.t # edit lib/Person.pm and lib/Employee.pm @@ -1331,7 +1332,7 @@ print $person->full_name

    Roles in Practice

    @@ -1636,7 +1637,7 @@ requires 'compare';
  • Human @ISA Animal
  • Human does Toolmaker (as does Chimpanzee)
  • Car @ISA Vehicle
  • -
  • Car does Destroyable
  • +
  • Car does HasEngine
  • @@ -1827,6 +1828,22 @@ has packages => (
    +

    What if I Want to Share?

    + +
    package Person;
    +use Moose;
    +
    +my $highlander_bank =
    +    Bank->new(
    +        name => 'Clan MacLeod Trust' );
    +
    +has bank => (
    +    is      => 'rw',
    +    default => sub { $highlander_bank },
    +);
    +
    + +

    Builder

    @@ -2159,9 +2184,8 @@ has first_name => ( @@ -3531,7 +3555,7 @@ Iterate til this passes all its tests

    - Otherwise, jump to slide 268 ... + Otherwise, jump to slide 269 ...

    @@ -3757,7 +3781,7 @@ with HasCollection => { type => 'Int' };
  • mailing list - moose@perl.org
  • Slides and exercises are in Moose's git repo:
    - git://git.moose.perl.org/moose-presentations/moose.git
  • + git://jules.scsys.co.uk/gitmo/moose-presentations