From: Dave Rolsky Date: Thu, 3 Feb 2011 21:22:13 +0000 (-0600) Subject: Show as_string sub in Printable role inlining example X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ea57173fd92fb82014bea4e34ec659f0c2b3aa9;p=gitmo%2Fmoose-presentations.git Show as_string sub in Printable role inlining example --- diff --git a/moose-class/slides/index.html b/moose-class/slides/index.html index 25bf289..e8ee8ab 100644 --- a/moose-class/slides/index.html +++ b/moose-class/slides/index.html @@ -1344,7 +1344,9 @@ $person->print();
package Person;
 use Moose;
 
-with 'Printable';
+with 'Printable'; + +sub as_string { $_[0]->first_name() }
@@ -1355,6 +1357,8 @@ use Moose; with 'Printable'; +sub as_string { $_[0]->first_name() } + has has_been_printed => ( is => 'rw' ); sub print {