Modules are not OO. If he's uncomfortable with OO (for whatever reason), then have him put stuff in libraries with Exporter. That, at least, is code reuse.

As for performance ... if it's performance you want, why are you writing in Perl? Perl's OO isn't the performance hit - it's those damn scalars, arrays, and hashes you love using. If those weren't around (particularly the scalars), Perl would be at least 2-3x faster and use like 1/10th of the memory. But, what would be the point?

As for work - there's a manager, and it doesn't sound like it's you. You need to talk to this person and have him/her make a decision as to coding styles and if there will be one for the group. If there isn't, DROP IT. No-one is so valuable that they can't be fired. I was once let go the very next day after I implemented a 99% speedup (~5 minutes to ~2 seconds) in the core subroutine for the application that controlled all of $VERY_LARGE_COMPANY's factory forecasting and purchasing. If you are perceived as being hard to work with, you will be the one in the sights, not your coworker.

And, maybe you coworker has a point. Maybe this stuff doesn't need to be written very well, so long as it works. Maybe getting it out the door is more in line with the company's vision than having stuff that takes longer to write, but is easier to maintain. Maybe the extra time spent polishing the code costs more than a bug. I don't know, but maybe your coworker might.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

In reply to Re: Coding styles: OOP vs. Subs by dragonchild
in thread Coding styles: OOP vs. Subs by nikos

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.