good chemistry is complicated,
and a little bit messy -LW
Re: looking towards learning OOPby pjf (Curate)
|on Sep 12, 2008 at 13:45 UTC||Need Help??|
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,
Perl Training Australia