This is only my personal opinion, so please take with a grain of salt. First, if 30% of your files are comments, you are doing something wrong. Unless you're just new to programming/Perl, the code should document itself, with only very brief comments sprinkled throughout to remind you and the next person who edits your code why you did something funky (or fancy, which you may not remember).

Second, if you strip all whitespace, the code will become illegible. What happens if you need to edit something? Granted, you could keep the original and re-run your modification tool every time, but that is just going to be one extra step of potential breakage, and needless to say it is going to take more time as well.

Third, I understand why you'd want to do this, but I'd advise you keep descriptive names for your variables. You'll thank yourself in the future.

In closing, you might want to hand edit all the code. It may do two things: help you write better, more compact and readable code in the future, and help you fall into a more consistent, convenient writing style, as well as get you into a groove of writing shorter, but just as descriptive variable names (I'm not judging any of your code skills, because you didn't provide code ;)

fwiw, I always thought perl stripped comments and eliminating whitespace by default, so are you talking about initial compile time that you want to minimize?


In reply to Re: suggested module/tools to automatically "tighten" my perl by stevieb
in thread suggested module/tools to automatically "tighten" my perl by abcperl5

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.