Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: suggested module/tools to automatically "tighten" my perlby stevieb (Canon) |
on Jun 21, 2012 at 23:55 UTC ( [id://977733]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|