Other posters have recommended learning OO design and theory before leaping into doing it in Perl. I'm in agreement with them, so I won't repeat their points here. Instead I'll focus on how leap into Perl once you get there.

Damian's OOP book is good, but it reflects the state of OOP eight years ago, and things have changed quite a bit since then. All the things about pseudo-hashes are right out; they've been officially deprecated and removed from the language in more recent releases of perl.

If you want a more up-to-date text, I'd recommend Perl Training Australia's Object Oriented Perl course notes (there's a downlink link to the pdf near the top), which also contain references into Damian's book if you've got it. You may also wish to consider "Perl Best Practices", which contains a detailed chapter on OOP, and does cover many recent advancements.

Disclaimer: I own half of Perl Training Australia (PTA), and my name is on the front of the OOP notes, so I may be biased.

However I feel both PBP and my own OOP text both cover OOP as it was a couple of years back. OOP is one of those things where I feel there are too many ways to do things. Trying to do it without a framework is a lot of work, and becomes much harder when one appreciates all the things that can go wrong with inheritance.

These days, I've been recommending Moose. It's a complete framework, it's been tested in some very big enterprise projects, it's going into the Google Perl AppEngine framework, it has a great community, and it has some of the smartest people I've ever met working on it. The only reason it's not in PTA's OOP notes is because I haven't had time to write about it.

If you are learning Moose, I'd recommend hopping on the #moose channel on irc.perl.org. It tends to be very active, and very helpful, and you'll usually find all the core developers there. If you need a hand, it's a great place to ask.

I've not heard of Spiffy before, so I can't comment on it one way or the other.

All the best,


In reply to Re: looking towards learning OOP by pjf
in thread looking towards learning OOP by spx2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.