Well, we can tell where you went to school. :P

That certainly is an object. Well, it is to everyone who didn't attend 'Comp Sci: OOP and Pissing on people 101'. It may not meet your definition of an object, but Perl doesn't meet many peoples definition of an object orientated programming language either.

Why not pat someone on the back and say 'Yes. It is an example of code that encapsulates code and data into a uniform interface. And wait till perl 6, when it will have even more object properties to play with.'

Update: I really need to get more sleep before posting things like that. In fact, if I got more sleep I wouldn't post things like that. I'm sorry, ariel, for the rudeness.

However I do not think that 'patting someone on the back is rude' - it may just have different overtones depending on where somebody comes from. dragonchild clearly had a revelation on how to structure code well, so ++ for seeing it. Perl isn't more OO than C++ or Java but it does use some of the ideas of OO when dealing with data.

I guess I'm a little sensitive because I keep being cornered by people who prefer to talk it rather than do it (I'm not accusing you of this) and one of the favourite seems to be whether certain things are OO, functional or whatever.

I can recall having exactly the same thought as dragonchild and then thinking "oh, wait, can't inherit, can't add properties, damn". I was still quite proud of it though.

I think my next project may be a little proggie that monitors what I type and pops up and says "Do you really want to flame him? y/N?" whenever I lack the judgement.

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re: Re: Why perl is more OO than C++ or Java... by jepri
in thread Why perl is more OO than C++ or Java... by dragonchild

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.