Документация
HTML CSS PHP PERL другое

4.7 Editing

 
Previous Table of Contents Next

4.7 Editing

For those of you who are not Star Trek fans, in several series and movies there was a villainous race called the Borg, whose modus operandi was to conquer a people by gradually assimilating them with mechanical body implants. Making someone else's program your own is a similar process of infusing it with your own code and devices until you are certain that you have it under control.

Once you have used a beautifier to make code fit your preferred standard for layout, you can apply line editing techniques for reducing code bloat. (If you ever did an exercise in high school English called pr´cis, where you took a long-winded screed and condensed it as much as possible, I am talking about the moral equivalent of that process for computer programming.) If you can reduce the amount of code without introducing obfuscation, the result will be clearer and easier to maintain. The more familiar you are with Perl and its efficient idioms, the better you'll be able to do that. As you reduce the bulk of the code through line editing, its purpose will become clearer and you will find it easier to spot inefficient or redundant higher-level constructions.

    Previous Table of Contents Next
    © 2000- NIV