in reply to looking towards learning OOP

Stefan,

From your post I understand you to mean that you've never done OO programming before, and you are wanting to learn it within Perl, not that you already understand OO and simply want to learn how to do it in Perl.

This is exactly the same boat I was in around 9 years ago as a budding Perl programmer. I had never touched OO; I thought it was some useless buzzword. I'd seen it explained slightly in some introductory CS textbooks, but never in a way that made the use apparent. :)

Perl is where I learned OO, and that has been the right place to do it. I completely disagree with those who said go learn your OO concepts elsewhere and then come learn how to do it in Perl. The authors of Perl's OO documentation are some of the world's best programmers. If you learn OO here, you will learn it as well as or better than you will learn it anywhere else.

This was exactly the case for me. Within two years of learning OO through Perl, I was designing a team project and school and everyone agreed my OO design work was spectacular, even though they had far more OO experience than me. I've received similar such validation for my OO understanding ever since, in undergraduate and graduate work, as well as in my professional career. I am today (sadly) a Java programmer (though still a Perl programmer at heart), and much of my work consists of fixing up things people have done earlier, improving the OO considerably for real, tangible benefits in maintainability, added features, and bug fixes.

Sorry; I hope it doesn't sound like I'm tooting my own horn. I'm just another Perl programmer. :) I'm just saying that if you learn OOP in the Perl world, you will not be at any disadvantage under other languages, and in fact you may very well find yourself at an advantage.

Here's a path I'd recommend; it looks similar to the path I took:

Replies are listed 'Best First'.
Re^2: looking towards learning OOP
by TGI (Parson) on Sep 13, 2008 at 16:46 UTC

    This is the best advice in this thread.

    The easiest way to start is with "classical" blessed hashes. You can do a lot with them. The mechanisms are relatively clear.

    I'd suggest reading perlboot and perltut. If you want more detailed discussion of the basics, get Conway's OOP.

    Once you grok the classical method, explore. Either go straight to Moose (if you are primarily pragmatic in your thinking) or read the rest of OOP and explore a bit. Learn about AUTOLOAD to build methods automatically, blessing typeglobs, and all other manner of strange things.


    TGI says moo