X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=moose-class%2Fslides%2Findex.html;h=25bf289f4d5544023709644e812f4aeff3cee813;hb=137185647395c7ce62b7db523ba3781bd9c6b777;hp=678bd94e8d762c170df76c30183c160423a7c8c5;hpb=aadb685d19dae9cc8e146db1882e9dd70bd24fc0;p=gitmo%2Fmoose-presentations.git diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index 678bd94..25bf289 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -72,7 +72,7 @@ img#me05 {top: 43px;left: 36px;}
  • Declarative OO sugar
  • Introspectable
  • Extensible (188 MooseX::* on CPAN)
  • -
  • Community approved (1222 downstream dependents on CPAN)
  • +
  • Community approved (1200+ downstream dependents on CPAN)
  • @@ -155,7 +155,7 @@ img#me05 {top: 43px;left: 36px;}
    package Person;
     use Moose;
     
    -has first_name => ( is => 'rw' );
    +has first_name => ( is => 'ro' ); @@ -1069,7 +1069,7 @@ use Moose; @@ -1309,23 +1309,25 @@ sub print {
    package Person;
     use Moose;
     
    -with 'HasPermissions';
    +with 'Printable';

    Classes Consume Roles

    -
    my $person = Person->new(
    +
    package Person;
    +
    +sub as_string { $_[0]->first_name() }
    +
    +...
    +
    +my $person = Person->new(
         first_name   => 'Kenichi',
         last_name    => 'Asai',
         access_level => 42,
     );
     
    -print $person->full_name
    -    . ' has '
    -    . $person->can_access(42)
    -        ? 'great power'
    -        : 'little power';
    +$person->print();