or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
34 used & new from $12.63

Have one to sell? Sell yours here
 
   
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
Perl Medic: Transforming Legacy Code
 
See larger image
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

Perl Medic: Transforming Legacy Code (Paperback)

~ Peter J. Scott (Author)
4.4 out of 5 stars  See all reviews (7 customer reviews)

List Price: $39.99
Price: $30.39 & this item ships for FREE with Super Saver Shipping. Details
You Save: $9.60 (24%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Only 1 left in stock--order soon (more on the way).

Want it delivered Monday, November 9? Choose One-Day Shipping at checkout. Details
20 new from $13.99 14 used from $12.63

Frequently Bought Together

Perl Medic: Transforming Legacy Code + Perl Testing: A Developer's Notebook (Developers Notebook) + Perl Best Practices
Price For All Three: $76.56

Show availability and shipping details

  • This item: Perl Medic: Transforming Legacy Code by Peter J. Scott

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Perl Testing: A Developer's Notebook (Developers Notebook) by Ian Langworth

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Perl Best Practices by Damian Conway

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Perl Hacks: Tips & Tools for Programming, Debugging, and Surviving

Perl Hacks: Tips & Tools for Programming, Debugging, and Surviving

by chromatic
5.0 out of 5 stars (10)  $19.79
Perl Cookbook, Second Edition

Perl Cookbook, Second Edition

by Tom Christiansen
4.7 out of 5 stars (114)  $32.97
Mastering Perl

Mastering Perl

by brian d foy
4.4 out of 5 stars (9)  $26.39
Higher-Order Perl: Transforming Programs with Programs

Higher-Order Perl: Transforming Programs with Programs

by Mark Jason Dominus
4.7 out of 5 stars (14)  $45.96
Perl Best Practices

Perl Best Practices

by Damian Conway
4.5 out of 5 stars (35)  $26.40
Explore similar items

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.



Product Description

This book is about taking over Perl code, whether written by someone else or by yourself at an earlier time. Developers regularly estimate that they spend 60 to 80 percent of their time working with existing code. Many problems of code inheritance are common to all languages, but the nature of the language makes Perl especially tricky. The reason why is that Perl is similar to English - bursting with irregular verbs, consistent only when it's convenient, borrowing terms from other languages, and providing many ways to say the same thing. In fact, Perl developers have a motto with the abbreviation TMTOWTDI: There's More Than One Way To Do It. While this flexibility is one of the language's strengths, it also makes it extremely difficult when you are faced with an existing piece of code. There are millions of lines of Perl code being used all over the Web; much of it was built on an ad hoc basis, the creators never imagining that the code would still be in use months or years later. This book will be the resource all Perl programmers need to understand someone else's code, even when it's bad; repair it; convert it to a better style; upgrade it to the latest version of Perl; maintain it; and find and fix its bugs.

Product Details

  • Paperback: 336 pages
  • Publisher: Addison-Wesley Professional (March 15, 2004)
  • Language: English
  • ISBN-10: 0201795264
  • ISBN-13: 978-0201795264
  • Product Dimensions: 9 x 6.9 x 0.8 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.com Sales Rank: #459,542 in Books (See Bestsellers in Books)

More About the Author

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

Visit Amazon's Peter Scott Page

What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(3)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

7 Reviews
5 star:
 (4)
4 star:
 (2)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (7 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
15 of 16 people found the following review helpful:
5.0 out of 5 stars Novel and effective tutorial in solid Perl Programming, March 17, 2004
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.

Comment Comment (1) | Permalink | Was this review helpful to you? Yes No (Report this)



 
11 of 11 people found the following review helpful:
5.0 out of 5 stars One of the best Perl books out there, June 24, 2004
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. Two other very good sections are the one on antipatterns in chapter 4 and the one on cargo cult programming in chapter 6. Together these sections give a programmer a number of easy to recognise quick wins when improving existing code and a checklist of things not to do when writing new code.

There are a couple of niggles. I've already mentioned that I think the book has been slightly mis-targetted and that it should have been aimed at anyone writing Perl code. The other problem that I had was that the medic analogy that runs through the book gets a bit strained at times. But these are only minor and they shouldn't prevent you from adding this book to your library.

In fact, all in all, the quote on the front cover is pretty accurate.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
8 of 8 people found the following review helpful:
5.0 out of 5 stars A good book with a misleading title, May 18, 2004
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

3.0 out of 5 stars Doesn't live up to it's hype.
The book didn't really give me any insight in how to transform legacy code to modern oop. The examples were ok but considering I bought this based on other reviews I figured it... Read more
Published 20 days ago by J. Kingsbury

4.0 out of 5 stars great if you inherit wretched old code
When Perl Medic came out, we received a review copy. It was the first review book we got, and I was pretty excited. Read more
Published on August 5, 2007 by Ricardo Signes

4.0 out of 5 stars Bad title, good contents
Like author Peter Scott's previous book (co-written with Ed Wright), Perl Debugged, Perl Medic is rather inaccurately titled. Read more
Published on July 17, 2007 by Thing with a hook

5.0 out of 5 stars A "must have" for every Perl beginner...
I wish I read this book earlier...
In fact it's my only regret about this book...

This book is an absolute "must have" for every Perl beginner... Read more
Published on July 20, 2004 by A. Assad

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Discussion Replies Latest Post
textbook scam 66 4 days ago
Textbooks for Kindle DX? 60 7 days ago
Amazon is a great place to buy textbooks! 35 16 days ago
Search Customer Discussions
Search all Amazon discussions
   



So You'd Like to...


Create a guide

Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.