Re: Style Best Practices
by perrin (Chancellor) on Apr 27, 2004 at 20:57 UTC
|
The best writing I've seen on this subject is in the book Perl Medic, by Peter Scott. I would recommend it over the Effective Perl book, which is more useful for learning how to use some of the trickier parts of Perl (map, pack, etc.). | [reply] |
|
| [reply] |
Re: Style Best Practices
by pzbagel (Chaplain) on Apr 27, 2004 at 20:38 UTC
|
Effective Perl Programming: Writing Better Programs With Perl
by Joseph N. Hall and Randal Schwartz
This book is more about finesse with Perl rather than style per se. But it discusses important topics which definately relate to style (like how using $_ can simplify your code immensely and make it more readable.)
Later
| [reply] |
Re: Style Best Practices
by benrwebb (Scribe) on Apr 27, 2004 at 20:46 UTC
|
If you haven't yet, check out Chapter 24 of Programming Perl by Larry Wall, Tom Christiansen and Jon Orwant. | [reply] |
Re: Style Best Practices
by thor (Priest) on Apr 27, 2004 at 21:10 UTC
|
Regardless of what you come up with as your "style guide", enforce it with perltidy. It has so many options, I think that it'd be hard to find something that you would want to do that it is unable to handle. I wrote my .perltidyrc a couple of years ago, and haven't looked back since. Plus, if this is part of a large project, you could have perltidy be part of the automated check-in process.
| [reply] |
Re: Style Best Practices
by tilly (Archbishop) on Apr 28, 2004 at 01:50 UTC
|
I've been saying it for years, but it is still good advice. Pick up the book
Code Complete and read it. Carefully.
I don't care that it is not a Perl book. I don't care that Perl is not used in any of its examples. It is still relevant.
If you're willing to wait, you could wait until the second edition comes out this summer and read that instead. Or in addition if you've already read it by then. | [reply] |
|
I second that. It should be mandatory reading for every programmer.
| [reply] |
|
In this context it might be worth noting that there will be a 2nd edition of Code Complete very soon (June 2004).
| [reply] |
|
Did you read my third paragraph?
| [reply] |
|
|
| [reply] |
Re: Style Best Practices
by kutsu (Priest) on Apr 27, 2004 at 20:57 UTC
|
One simple and free solution would be to Super Search for Perl Style, Coding Style, Programming Style, etc.... For example a very quick search for Perl Style got me Perl Style Guides for Large Projects, and I know there are many more
"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
| [reply] |
Re: Style Best Practices
by Anomynous Monk (Scribe) on Apr 28, 2004 at 06:45 UTC
|
| [reply] |