O'Reilly logo

Perl Medic: Transforming Legacy Code by Peter Scott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Restructuring (The Operating Table)

“The end of art is to figure the hidden meaning of things and not their appearance; for in this profound truth lies their true reality, which does not appear in their external outlines.”

— Aristotle

Image

Beyond simple rewriting lies the deeper analysis and restructuring of your program. In this chapter I’ll cover several important aspects of restructuring inherited code.

6.1. Keep It Brief

A big problem with the maintainability of many programs is that their code units are just too long. (By “code unit” I mean a subroutine or the main program.) Once a code unit exceeds the length of what you can view ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required