Fellow Monks;
I have been trying to learn how to use Perl for a little over four months now. I can do; simple scripting, class creation, module usage. I have been learning alot of new things and tricks as well. My next task is to learn how do Object Oriented programming, and I want to use Perl to learn with.
...but is Perl an Objected Oriented Programming Language?
There are two main computer science guru's in my shop. I will use GURU_01, and GURU_02 as their labels. They both have loads of experiance and an awesome amount of knowledge to share. GURU_01 says that Perl is NOT an OO language, and should only be used as a 'glue' scripting language. GURU_02 says he doesn't know enough about Perl to make a descision. GURU_02 also says that there are four elements that make up an Object Oriented Language; Inheritance, Abstraction, PolyMorphism, and Encapsulation
- Inheritance
- I know that Perl supports inheritance, as I have seen it in some of merlyn's examples.
- Abstraction
- I believe that I have seen abstraction in other Perl modules (especially CPI.pm), but I cannot be sure. Hell, I think that I have even coded in astraction while writing a module for accessing a database.
- Encapsulation
- I believe that encapsulation exists in Perl (Modules, classes, etc), but I am not a computer scientist so I cannot be certain
- Polymophism
- I have not seen any thing on polymorpism in Perl.
My Questions
- Does Encapsulation exist in Perl? If so, are there any examples that you could point me to please?
- Does Polymorphism exist in Perl? Any examples are welcome
- Is Perl a true or psuedo OO Language?
I want to thank everyone in advance for their constructive critisim. I do not mind being RTFM'd, just please point me the the FM;)
Kristofer A. Hoch
Microwaving a Twinkie is a bad idea
T.W.I.N.K.I.E.S Project
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.