in reply to Re: Object Oriented Perl - very basic guide
in thread Object Oriented Perl - very basic guide

I'd generally agree - what I was aiming to do was outline the basics. Personally I find I understand things lots better if I do it the 'hard way' first, then throw it away and go and find a module to do it.

  • Comment on Re^2: Object Oriented Perl - very basic guide

Replies are listed 'Best First'.
Re^3: Object Oriented Perl - very basic guide
by jeffa (Bishop) on May 15, 2014 at 14:41 UTC

    I learned OO long before i learned Perl, via Java and C++. When introduced to Perl's OO, i was initially baffled. Perl has a less than perfect OO system. I would only discuss Perl's OO "internals" (i.e. having to bless a thingy to a package via a sub called "new") in an advanced chapter, after the more useful stuff like composition and roles have been discussed, personally. It tends to turn people off, seeing that new sub ...

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re^3: Object Oriented Perl - very basic guide
by boftx (Deacon) on May 15, 2014 at 23:27 UTC

    I have held the opinion for quite a while now that better one understands "classic" Perl OO the more one can understand just what Moose (and the rest) are doing for you. And depending upon circumstances and/or goals (such as the $work environment) it might not be feasible to take advantage of them. If that is the case, then a solid understanding of classic OO allows you to do pretty much the same thing but in the restricted environment.

    My favorite tutorial by far has been the Animal Farm (Talk with the Animals) one, it is listed above but is no longer part of the core distro. :(

    It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.