From: Dave Rolsky Date: Thu, 18 Jun 2009 00:10:35 +0000 (-0500) Subject: Update moose class outline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65f6c5863772f3a02bcb5616f0bb95b3ddef9c40;p=gitmo%2Fmoose-presentations.git Update moose class outline --- diff --git a/moose-class/slides/outline b/moose-class/slides/outline index 789baa9..bbcdacd 100644 --- a/moose-class/slides/outline +++ b/moose-class/slides/outline @@ -82,10 +82,16 @@ ** Email ** class names & role names * coercions +* duck_type * attribute isa & does +* attribute coerce => 1 +* MX::Types == Exercises +* Add sane types to all existing attributes in Person, Employee, roles +* Add an email attribute. Make a new email type that does some minimal validate like /[^@]+\@[\w\-]+(?:\.[\w\-]+)+/ + = Advanced attributes * weak_ref @@ -95,12 +101,36 @@ == Exercises +* Make the bank account a proper object and delegate to it for deposit & withdraw +* Add an overdraft account like in the cookbook +* Make the overdraft account link bank to accounts which link to it as a weak_ref +* metaclass & traits? + = Introspection -== Exercises +* List of attributes for a class +** attribute options +** associated methods +* List of methods for a class +** associated attributes +** check original_package for source of method (did it come from a role?) +** $method->isa(...) to determine if it's wrapped/augmented/overridden +* List of parent classes, subclasses = Tour of MooseX +* MX::AH +** delegation for Perl built-ins +** private accessor with public provides (_options as the attribute, get_option, set_option, options_list) +** lazy default of an empty reference +* ::StrictConstructor +* ::Getopt +* ::Clone +* ::Declare +* ::Workers +* ::Singleton +* ::ClassAttribute + = Writing a MooseX Module == Exercises