Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: suggested module/tools to automatically "tighten" my perl

by stevieb (Canon)
on Jun 21, 2012 at 23:55 UTC ( [id://977733]=note: print w/replies, xml ) Need Help??


in reply to suggested module/tools to automatically "tighten" my perl

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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://977733]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found