Howdy.

Executive Summary
=================

What are the arguments in favor of using dynamic code (e.g. Class::Accessor and Class::DBI), versus writing procedural code? I am particularly interested in discussions of code quality, testability, and productivity.

Background
==========

I was extremely fortunate to land a job at a very large company hacking Perl. At the end of the day, my bottom line is that jobs like this (good management and lifetime best compensation) for guys in their mid-40's don't grow on trees, and given the long term compensation practices around here, it's worth my while to stay here until retirement.

I was hired to support a business line that we bought from another company that processes credit transactions worth a lot of money. After porting our stuff onto the company platforms, and stabilizing it to live in a much more secure (thus restrictive) environment without setting off on call pagers dozens of times a night, we are making a push for code quality.

Part of this is going to involve settling on standard ways of doing things. I'm all for that. It's no skin off my nose to use a standard set of libraries, like picking Class::Accessor over Class::MakeMethods, Class::Contract or Class::Generate. When you waltz into a piece of code you're never seen before, it's nice to have a standard code layout, standard way of doing setup and so on.

My issue is that the point guy for the Perl practices study group is looking at Perl like it is Java, and wanting to treat it the same way. His POV is to use static code as much as he can. He writes all his accessor/mutators out manually using vim code snippets or an IDE. He claims that is safer and more maintainable that using dynamically generated closures and abstracting things like that into the background.

On my side, I've been using Perl professionally for 10 years now. And I use abstraction whenever possible, and in my own coding I will grab stuff from CPAN as needed, especially anything high quality with a simple interface.

Ack.

On the other hand, I think this guy is coming from the right place, and he won't just jam a set of standards down my throat. If I can marshal good arguments for using the dynamic aspect of Perl, I think he will at least give an honest listen, and in any case he's not making the final decisions.

Please help.


In reply to Help me avoid writing C Programs in Perl for a living by cleverett

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.