Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Dude, you do realize you're preaching to the one of the 12 Apostles, right? You really need to read up on the history of Perl. And, it's not just history.

I've spoken in the past about Fortune 500 companies using Perl. Most of them don't even realize they're using Perl. Why not?

Well, it has to do with the fact that there are no Perl applications. But, most of all the lines of Perl in this world are in little quick'n'dirty scripts that keep databases running, load / generate datafeeds, and do other general maintenance on over 100 types of systems.

Would it be better if they were all designed as "a simple module with a simple interface"? Of course. Yet, doing that would actually be detrimental ... for a number of reasons.

  • If it ain't broke, don't fix it. Every single code change needs to be tested. Code changes on the level you are proposing require complete retesting. That's dangerous.
  • Code changes on the level you propose are very expensive. You're talking about man-months. Many man-months. Just to make things "pretty".

Of course, you're assuming that these scripts will ever need changing. Many of these scripts are run exactly once. Most of the rest will be used in exactly one place. Let me give you an example. It's a shell script, but it's meant to do something Perlish.

#!/bin/sh for file in $* do echo "$file" perl -pi -e 's!\t(?=\t|$)!\t\\N!g;s#\\(?!N)#\\\\#g' $file done

I use it to cleanup files that I export from Oracle so that they're ready for importation into MySQL. The data importation process is a temporary process, meant to exist for less than a year. I'll probably be able to retire it in less than three years. But, I'm not going to use this anywhere else. Ever. If I do, I'll copy it. I still have to create the stub, so why go through all the trappings?

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

In reply to Re^4: How a script becomes a module by dragonchild
in thread How a script becomes a module by brian_d_foy

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (8)
    As of 2018-05-27 10:56 GMT
    Find Nodes?
      Voting Booth?