It is a nice book from what I've seen (and that's not just because it's the first time I've seen somebody use one of my modules in an actual print book :-)
You've not really mentioned the main subject of the book which is given away by the full title "Perl Medic: Maintaining Inherited Code". It has lots of concrete advice on approaching existing legacy Perl code and turning it into something vaguely sane.
If you're faced with this sort of task and are unsure how to approach it then it's definitely worth looking at.
For those who are interested perlmedic.com has downloads for code + errata. Chapter 3 is available online.
The table of contents gives an idea of what it covers:
1. Introduction (First Response).
First Things First.
Reasons for Inheritance.
Observe the Program in Its Natural Habitat.
2. Surveying the Scene.
Part or Whole?
Find the Dependencies.
3. Test Now, Test Forever (Diagnosis).
Testing Your Patience.
An Example Using Test- Modules.
Testing Legacy Code.
A Final Encouragement.
4. Rewriting (Transplants).
Why Are You Doing This?
Style. Comments. Restyling.
5. The Disciplined Perl Program.
Package Variables vs Lexical Variables.
Warnings and Strictness.
use strict in Detail.
use warnings in Detail.
6. Restructuring (The Operating Table).
Keep It Brief.
Cargo Cult Perl.
Escaping the Global Variable Trap.
7. Upgrading (Plastic Surgery).
Perl 4. Perl 5.000. Perl 5.001. Perl 5.002. Perl 5.003. Perl 5.004
Perl 5.005. Perl 5.6.0. Perl 5.6.1. Perl 5.8.0. Perl 5.8.1.
Perl 5.8.2. Perl 5.8.3.
8. Using Modules (Genetic Enhancement).
The Case for CPAN.
Improving Code with Modules.
9. Analysis (Forensic Pathology).
Eliminating Superfluous Code.
Finding Inefficient Code.
10. Increasing Maintainability (Prophylaxis)
Making It Robust.
Version Control System Integration.
11. A Case Study.
Desperately Seeking Sanity.
Coming into the 21st Century.
Incorporating Modules Effectively,
12. Conclusion (Prognosis).
If this all sounds familiar to you then you're probably not going to get a lot out of it. If you've not been faced with having to take over somebody else's code, or aren't used to building and maintaining larger Perl applications, then it's a useful read.
Peter Scott's other Perl book 'Perl Debugged' is also a good read, and not to be confused with the terrible 'Debugging Perl'.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||