YAPC::EU::2005

Maintaining Bad Perl

Maintaining Bad Perl

By Smylers from northwestengland.pm
Date: Wednesday, 31 August 2005 12:00
Duration: 20 minutes
Language:


Sometimes it's necessary to maintain or add features to code written by other people, and sometimes that code is not exactly up to the standard we'd like. This talk suggests practical ways of dealing with the situation.

Often the second reaction is that the whole thing needs rewriting (the first reaction, of course, is to run away screaming), but usually that is not practical, especially if the existing program is running acceptably.

Other people's Perl can be so far from following best practices that it's hard to make your additions in a style you'd normally program, and it's easy to end up compounding the problem.

This talk offers hints and tips for what to do, with strategies for adapting your good practices into existing code. Somewhat surprisingly these often involving doing things you'd never do when writing a new Perl program from scratch, such as using strict in just one function.

By following this advice you should be able to add in new features while smugly knowing you're incrementally improving the quality of the code.


Valid XHTML 1.0!   Valid CSS!