TulipTools Internet Business Owners and Online Sellers Community

Full Version: Ways to Improve Your Perl Programming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:Everyone writes sloppy code. It just goes with the territory. You start testing an idea, then replace half of that code with something else, and all the while the braces, indents, and idioms get more and more out of sync. You can't be bothered to worry about those with lunch coming up in a half hour! But now other people are looking at your code. It's time to impress them with your beautiful coding style! In addition, other people might have an easier time working with your code when it's easier to read.

perltidy, which you get by installing the Perl::Tidy distribution, reformats your code to look consistent. Write a bunch of slop and run it through perltidy, and it comes out sparkling clean with things aligned and indented. By default it uses the style outlined in the perlstyle documentation, but it's also configurable. It puts the reformatted script in a new file so you don't lose the original...

full article: http://www.onlamp.com/pub/a/onlamp/2007/...mming.html
OK, Mandy. You win. I'll read his new book when it becomes available.