On Feb 13, 2014, at 12:27 PM, Uri Guttman wrote: > On 02/13/2014 12:39 PM, Janek Schleicher wrote: >> Am 05.02.2014 23:30, schrieb kavita kulkarni: >>> Can somebody suggest me good book to learn/practice object oriented Perl >>> programming. >> >> The usual answer is to study computer science. >> >> OO programming is the same independet of language. > > actually that isn't totally true. the concepts are fairly language > independent but some languages have better support for OO than others. in > particular it isn't hard to do OO even assembler (which i did) in that i > grouped common data together and called subs via attached pointers. the > biggest feature (which i generally don't like anyway) is inheritance and that > pretty much has to be in the language to be effective.
Yup. The four pillars of Object Oriented Programming are said to be: 1. Encapsulation 2. Data hiding 3. Polymorphism 4. Inheritance Perl doesn't really do data hiding very well (google for "Larry Wall shotgun"), but it does support the other three OK. I have not programmed in Perl using OO techniques in years. I think I have written one big Perl program that uses OO inheritance in 15 years. (Just lucky, I guess :) CPAN modules should be OO nowadays, just to avoid namespace clashes (all the good function names are taken). -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/