X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=moose-class%2Fslides%2Findex.html;h=7df4bccfed376bb51a3a5ebb063384776b34ad03;hb=cbf2305bcc8357a9450403dc9b24ebdc48c10955;hp=b193f684349f045551c07d1094900e3df869718e;hpb=74c87c2d0f63829557e24fc34a7eed525f71d0f6;p=gitmo%2Fmoose-presentations.git diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index b193f68..7df4bcc 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -1319,6 +1319,8 @@ with 'Printable'; sub as_string { $_[0]->first_name() } +... + my $person = Person->new( first_name => 'Kenichi', last_name => 'Asai', @@ -1342,7 +1344,9 @@ $person->print();
package Person;
 use Moose;
 
-with 'Printable';
+with 'Printable'; + +sub as_string { $_[0]->first_name() }
@@ -1353,6 +1357,8 @@ use Moose; with 'Printable'; +sub as_string { $_[0]->first_name() } + has has_been_printed => ( is => 'rw' ); sub print { @@ -1658,8 +1664,6 @@ requires 'compare';

Real Examples