SlideShare a Scribd company logo
1 of 12
Learning Moose
Taking Perl Objects to the Next Level


Drew Stephens <drew@dinomite.net>
Classic Perl Objects
package Horse;

sub new {
   my $class = shift; my ($name, $legs) = @_;
   my $self = {name => $name; legs => $legs;}
   return bless $self, $class;
}

sub name {
   my $self = shift;
   if (@_) {$self->{name} = shift;}
   return $self->{name};
}
                                                drew@dinomite.net
It’s Crap
Enter Moose

Free constructor, accessors, and modifiers
Attribute type enforcement with parameter checking
Read-only attributes
Meta-programming
Pretty syntax



                                                     drew@dinomite.net
What’s a Horse Look Like?
    package Horse;
    use Moose;
    has 'name' => (
       is => 'rw',
       isa => ‘Str’,
       required => 1,
    );
    has 'legs' => (
       is => 'ro',
       isa => ‘Int’,
       default => 4,
    );
    1;

Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi   drew@dinomite.net
Making a Horse

    use Horse;

    my $ed = Horse->new(
       name => ‘Mr. Ed’
    );

    print $ed->name() . " has " . $ed->legs() . " legsn";




Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi   drew@dinomite.net
Abstract Classes
    package Animal;
    use Moose::Role;
    has 'name' => (
        is => 'rw', isa => ‘Str’, required => 1,
    );
    has 'legs' => (
        is => 'ro', isa => ‘Int’, default => 4,
    );
    requires 'sound';
    sub speak {
        my $self = shift;
        print $self->name, " goes ", $self->sound, "n";
    }
Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi   drew@dinomite.net
Inherited Horse
    package Horse;
    use Moose;
    with 'Animal';
    sub sound { 'neigh' }
    1;

    $ed->speak(); # Mr. Ed goes neigh




Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi   drew@dinomite.net
Extending Parent Methods
    package Mouse;
    use Moose;
    with 'Animal';

    sub sound { 'squeak' }

    after 'speak' => sub {
        print "[but you can barely hear it!]n";
    };

    # A mouse goes squeak
    # [but you can barely hear it!]

Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi   drew@dinomite.net
Type Coercion
    coerce 'HistoricalDateTime'
       => from 'Str'
       => via {
          require DateTime::Format::DateManip;
          DateTime::Format::DateManip->parse_datetime($_);
       };

    has 'born' => (
       is => 'ro',
       isa => 'HistoricalDateTime',
       coerce => 1,
    );

Randal L. Schwartz: Linux Magazine Column 95: The Moose is Flying (part 2). http://is.gd/50Nfm   drew@dinomite.net
Fill The Barn
    my $newbie = Horse->new(
       born => 'yesterday',
       name => 'Newbie'
    );
    $newbie->speak(); # Newbie goes neigh

    my $mouse = Mouse->new(
       name => 'Minnie',
       born => '3/14/1929'
    );
    $mouse->speak(); # Minnie goes squeak
                     # [but you can barely hear it!]

Randal L. Schwartz: Linux Magazine Column 95: The Moose is Flying (part 2). http://is.gd/50Nfm   drew@dinomite.net
References

Damian Conway: Perl Best Practices. O’Reilly, 2009

Randal L. Schwartz: Inside Out Objects.
   http://www.stonehenge.com/merlyn/UnixReview/col63.html

Jay Kuri: A Gentle Introduction to Moose.
    http://www.catalyzed.org/2009/06/a-gentle-introduction-to-moose.html

Randal L. Schwartz: The Moose is Flying.
   http://www.stonehenge.com/merlyn/LinuxMag/col94.html

Moose.pm on CPAN (v0.93).
   http://search.cpan.org/dist/Moose/lib/Moose/Manual.pod




                                                                           drew@dinomite.net

More Related Content

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Learning Moose SHDH 36 Lightning Talk

  • 1. Learning Moose Taking Perl Objects to the Next Level Drew Stephens <drew@dinomite.net>
  • 2. Classic Perl Objects package Horse; sub new { my $class = shift; my ($name, $legs) = @_; my $self = {name => $name; legs => $legs;} return bless $self, $class; } sub name { my $self = shift; if (@_) {$self->{name} = shift;} return $self->{name}; } drew@dinomite.net
  • 4. Enter Moose Free constructor, accessors, and modifiers Attribute type enforcement with parameter checking Read-only attributes Meta-programming Pretty syntax drew@dinomite.net
  • 5. What’s a Horse Look Like? package Horse; use Moose; has 'name' => ( is => 'rw', isa => ‘Str’, required => 1, ); has 'legs' => ( is => 'ro', isa => ‘Int’, default => 4, ); 1; Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi drew@dinomite.net
  • 6. Making a Horse use Horse; my $ed = Horse->new( name => ‘Mr. Ed’ ); print $ed->name() . " has " . $ed->legs() . " legsn"; Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi drew@dinomite.net
  • 7. Abstract Classes package Animal; use Moose::Role; has 'name' => ( is => 'rw', isa => ‘Str’, required => 1, ); has 'legs' => ( is => 'ro', isa => ‘Int’, default => 4, ); requires 'sound'; sub speak { my $self = shift; print $self->name, " goes ", $self->sound, "n"; } Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi drew@dinomite.net
  • 8. Inherited Horse package Horse; use Moose; with 'Animal'; sub sound { 'neigh' } 1; $ed->speak(); # Mr. Ed goes neigh Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi drew@dinomite.net
  • 9. Extending Parent Methods package Mouse; use Moose; with 'Animal'; sub sound { 'squeak' } after 'speak' => sub { print "[but you can barely hear it!]n"; }; # A mouse goes squeak # [but you can barely hear it!] Randal L. Schwartz: Linux Magazine Column 94: The Moose is Flying. http://is.gd/50Ezi drew@dinomite.net
  • 10. Type Coercion coerce 'HistoricalDateTime' => from 'Str' => via { require DateTime::Format::DateManip; DateTime::Format::DateManip->parse_datetime($_); }; has 'born' => ( is => 'ro', isa => 'HistoricalDateTime', coerce => 1, ); Randal L. Schwartz: Linux Magazine Column 95: The Moose is Flying (part 2). http://is.gd/50Nfm drew@dinomite.net
  • 11. Fill The Barn my $newbie = Horse->new( born => 'yesterday', name => 'Newbie' ); $newbie->speak(); # Newbie goes neigh my $mouse = Mouse->new( name => 'Minnie', born => '3/14/1929' ); $mouse->speak(); # Minnie goes squeak # [but you can barely hear it!] Randal L. Schwartz: Linux Magazine Column 95: The Moose is Flying (part 2). http://is.gd/50Nfm drew@dinomite.net
  • 12. References Damian Conway: Perl Best Practices. O’Reilly, 2009 Randal L. Schwartz: Inside Out Objects. http://www.stonehenge.com/merlyn/UnixReview/col63.html Jay Kuri: A Gentle Introduction to Moose. http://www.catalyzed.org/2009/06/a-gentle-introduction-to-moose.html Randal L. Schwartz: The Moose is Flying. http://www.stonehenge.com/merlyn/LinuxMag/col94.html Moose.pm on CPAN (v0.93). http://search.cpan.org/dist/Moose/lib/Moose/Manual.pod drew@dinomite.net

Editor's Notes

  1. When non-Perl folks look at this, they see a high ratio of non-word characters, lots of existentialisim, and some religious bullshit&amp;#x2014;they&amp;#x2019;re thinking one thing&amp;#x2026;
  2. Instead of using SUPER::, we can extend the parent method