in reply to Beautiful Perl

"Beautiful," in referring to code, may be an overuse of the word. I prefer "readable." And it isn't only Perl code that can be readable. It can be any language. There are principles that apply to all making any bit of code readable and maintainable. And does it need to be maintained by you or others (though the way my memory is going, they are one in the same).

Perl::Tidy is similar to other "tidying" programs, but I don't always agree with the author about what is tidy.

I'd read the thousands of links out there on coding practices, Perl and otherwise (you'll often see Perl badgered for it's tendency to be poorly written).

Then use those, plus a hybrid of what works for you and then stick to it (though I have altered certain stylistic practices once or twice in my coding career). Personally, I always try to write code that looks good on the page and that I can understand and fix months later. To write it so it is readable takes far less time than it takes to decipher poorly written code later.


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^2: Beautiful Perl
by Aristotle (Chancellor) on Mar 26, 2005 at 14:26 UTC

    I don‘t always agree with the author about what is tidy.

    You can probably make it do what you want anyway. There are approximately seven and a half million options to control the output. My own .perltidyrc changes 14 of the the defaults, f.ex. It‘s still not just so – I still disagree with a few of its choices –, but that‘s so rarely an issue that it matters little in practice.

    Makeshifts last the longest.

Re^2: Beautiful Perl
by jdalbec (Deacon) on Mar 26, 2005 at 15:31 UTC
    "Beautiful," in referring to code, may be an overuse of the word.
    I suspect that terminology got started with the "C Beautifier" cb.
    I don't always agree with the author about what is tidy.
    If the configuration options don't work for you, you can always hack the source code...