Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


In reply to Perl - Is it an OO Language by krisahoch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found