Programming Books C Java PHP Python Learn more Browse Programming Books
Perl Medic: Transforming Legacy Code and over one million other books are available for Amazon Kindle. Learn more
Buy New
$22.61
Qty:1
  • List Price: $39.99
  • Save: $17.38 (43%)
FREE Shipping on orders over $35.
Usually ships within 2 to 4 weeks.
Ships from and sold by Amazon.com.
Gift-wrap available.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Perl Medic: Transforming Legacy Code Paperback – March 15, 2004

ISBN-13: 978-0201795264 ISBN-10: 0201795264 Edition: 1st

Buy New
Price: $22.61
18 New from $13.19 31 Used from $1.85
Amazon Price New from Used from
Kindle
"Please retry"
Paperback
"Please retry"
$22.61
$13.19 $1.85
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Frequently Bought Together

Perl Medic: Transforming Legacy Code + Effective Perl Programming: Ways to Write Better, More Idiomatic Perl (2nd Edition) (Effective Software Development Series)
Price for both: $58.08

One of these items ships sooner than the other.

Buy the selected items together
NO_CONTENT_IN_FEATURE

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 336 pages
  • Publisher: Addison-Wesley Professional; 1 edition (March 15, 2004)
  • Language: English
  • ISBN-10: 0201795264
  • ISBN-13: 978-0201795264
  • Product Dimensions: 7 x 0.9 x 9.1 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (7 customer reviews)
  • Amazon Best Sellers Rank: #1,974,284 in Books (See Top 100 in Books)

Editorial Reviews

Amazon.com Review

Perl ranks among hackers' favorite languages--there's always another approach to a problem, always optimization to be done, and forever new techniques to try. Perl's a hoot. But the culture of tinkering that surrounds Perl has resulted in a large body of hard-to-understand legacy code. That legacy code has to be maintained, extended, and adapted to new conditions--often without the help of the person who originally created it. Perl Medic considers Perl from the perspective of a programmer looking at code written by someone else and trying to answer the ancient question: "What were they thinking?"

It's a creative approach, and one that makes good reading for someone well-versed in Perl programming (author Peter Scott makes the analogy of becoming fluent in a human language, such as French, then studying its various accents and dialects). He shows, for example, a kludgy piece of code that's meant to catch CGI form uploads, then indicates that the obvious replacement is the CGI.pm module. Elsewhere, Scott shows why symbolic references are bad, and how to avoid them by means of hashes. Some of the value in this book is in the form of documentation of the differences among Perl versions; other useful coverage deals with warnings and strictness control as debugging tools. Read this straight through to improve your own code; use the index to help decipher and improve what someone else has written. --David Wall

Topics covered: How to write good Perl code, read bad Perl code, and convert bad Perl code into good in less time that would be required to write an equivalent replacement program from scratch. Testing, debugging, documenting, replacing custom code with CPAN modules, and embracing features that became available in later versions of Perl are all covered. Overall, the author endorses and generally explains the principles of Extreme Programming (XP) for Perl work.

From the Back Cover

  • Cure whatever ails your Perl code!
  • Maintain, optimize, and scale any Perl software... whether you wrote it or not
  • Perl software engineering best practices for enterprise environments
  • Includes case studies and code in a fun-to-read format

If you code in Perl, you need to read this book.—Adam Turoff, Technical Editor, The Perl Review.

Perl Medic is more than a book. It is a well-crafted strategy for approaching, updating, and furthering the cause of inherited Perl programs.—Allen Wyke, co-author of several computer books including JavaScript Unleashed and Pure JavaScript.

Scott's explanations of complex material are smooth and deceptively simple. He knows his subject matter and his craft-he makes it look easy. Scott remains relentless practical-even the 'Analysis' chapter is filled with code and tests to run.—Dan Livingston, author of several computer books including Advanced Flash 5: Actionscript in Action

Bring new power, performance, and scalability to your existing Perl code!

Today's Perl developers spend 60-80% of their time working with existing Perl code. Now, there's a start-to-finish guide to understanding that code, maintaining it, updating it, and refactoring it for maximum performance and reliability. Peter J. Scott, lead author of Perl Debugged, has written the first systematic guide to Perl software engineering. Through extensive examples, he shows how to bring powerful discipline, consistency, and structure to any Perl program-new or old. You'll discover how to:

  • Scale existing Perl code to serve larger network, Web, enterprise, or e-commerce applications
  • Rewrite, restructure, and upgrade any Perl program for improved performance
  • Bring standards and best practices to your entire library of Perl software
  • Organize Perl code into modules and components that are easier to reuse
  • Upgrade code written for earlier versions of Perl
  • Write and execute better tests for your software...or anyone else's
  • Use Perl in team-based, methodology-driven environments
  • Document your Perl code more effectively and efficiently

If you've ever inherited Perl code that's hard to maintain, if you write Perl code others will read, if you want to write code that'll be easier for you to maintain, the book that comes to your rescue is Perl Medic.

On the Web Site

Download all of the book's sample code from <www.perlmedic.com>.


More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.4 out of 5 stars
5 star
4
4 star
2
3 star
1
2 star
0
1 star
0
See all 7 customer reviews
Even if it's good code, this book can help.
Ricardo Signes
The writing style is very easy to read, and the order of presentation works well.
Kenneth Graves
And for someone who is serious about Perl I think you should get this book.
Jack D. Herrington

Most Helpful Customer Reviews

16 of 17 people found the following review helpful By Jack D. Herrington on March 17, 2004
Format: Paperback
You can learn a lot from books (or so it seems), but you can't learn a feel for the language. I had read all of the O'Reily Perl books and found myself in charge of a large Perl project writing new code. I hired on a real Perl guru and he taught me a ton, in person, about how to write Perl as Perl and do it well. What amazes me about Perl Medic is how much of what the Perl guru taught me is in this book. It's as if I had the man by my side again.
On it's face that makes it sound like you should pick up the book immediately. And for someone who is serious about Perl I think you should get this book. But there are still some faults. It could be a little better organized. And some of the common problems, like CGI scripts having embedded HTML, could be given more prominence and the text templating alternative given some more space. I looked in the tiny index for HTML::Template and found only two references, both of which were pretty short.
In what is probably both a curse and a blessing the book is not only about fixing legacy code. The majority of the book is about becoming a better Perl programmer and writing Perl as Perl. There are a few chapters and the beginning and end that are specifically about working with legacy code, but the majority of the book is practical insights into Perl coding styles using code fragments with effective exposition.
Small problems aside. This unique book is fun to read and is packed with valuable insights if you spend the time to look. The author obviously knows a lot about Perl and understands how to convey that knowledge to the reader effectively. If you are looking to maintain some Perl, or if you have hit a plateau in your understanding of Perl and you need a push to get to a higher level this book is for you.
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
11 of 11 people found the following review helpful By David Cross on June 24, 2004
Format: Paperback
A quote on the front cover of this book says "if you code in Perl then you need to read this book". That's a pretty bold claim to make. It made me think of the hyperbole on covers of books that claim to teach you to program in Perl in just a few days. But this book is published by Addison Wesley, who are a well respected technical publisher of technical books and the quote is from Adam Turoff who certainly knows what he's talking about when it comes to Perl programming. So in this case the claim isn't hyperbole. The book really is one that I want every Perl programmer to read.
Perl gets a lot of bad press from people who claim that it encourages people to write unreadable code. Whilst there's certainly a lot of very bad Perl code out there I think that's more a sign that it's used by a lot of people who don't know how to program than a reflection on the language itself. And that's where this book comes in. It assumes that you are familiar with the syntax of Perl but that you've never really been shown how to use it effectively. Which is a situation that many Perl programmers find themselves in.
Perl Medic is actually targetted at people who have to maintain older Perl code written by someone else, but I think that the information it contains is just as useful to anyone coding in Perl. Peter Scott has a lot of experience in writing Perl and in training other people to write Perl and the distillation of that experience and knowledge into these 300-odd pages mean that there are few Perl programmers who won't pick up something useful from this book.
The main emphasis in the book is on increasing the maintainability of code. The techniques are wide-ranging. I particularly enjoyed the examples of refactoring programs and the coverage of using modules from CPAN.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
8 of 8 people found the following review helpful By Kenneth Graves on May 18, 2004
Format: Paperback
While the "medic" metaphor recurs throughout the book, most of the material isn't directly related to repairing old code. Instead, this is a collection of best practices for new code. (The author recommends rewriting existing code if at all possible.) It ends up resembling another excellent Perl title, Joseph Hall's Effective Perl Programming. Good company to keep. Perl Medic has the advantage of being newer, and of covering a bit more material. The writing style is very easy to read, and the order of presentation works well. An excellent title for any intermediate-level Perl programmer.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
Format: Paperback
When Perl Medic came out, we received a review copy. It was the first review book we got, and I was pretty excited. I took it to (of all places) the gym with me, and read it while I ran. A lot of Perl People were raving about how it was the awesomest book in a long time, and I just couldn't get that excited about it. Despite that, I find myself recommending it to more and more fellow programmers.Here are the things that I find especially useful in the book:

Tests

I am all for testing. I like testing. Testing helps me code better. Testing helps me figure out what badly documented features should do, and helps me notice that my patches are going to break in production. It's just the right thing to do. When reading, I thought the coverage of testing was a too long, but that was because I was already at home with it. Really, it's the right length for someone who's not already testing, and Peter Scott should be applauded for writing one of the first Perl books to really explain and encourage testing. Moreover, he stays true to the book's "for maintenance programmers" nature and talks about the troubles with writing tests for code you didn't write, including testing traditionally hard to test things like CGI scripts.

perldelta

The book walks through historical versions of perl from version 4 (!) to 5.8.3. The authors tells you what changed, and what you should probably do if you upgrade the platform your old Perl code is running on. (Moving to 5.6? Now you can use C<our>. Moving to 5.8? Restricted hashes!)

Cargo Cult Perl

The author devotes almost a whole chapter to pointing out stupid things that people write because they don't really know what they're doing.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

What Other Items Do Customers Buy After Viewing This Item?