Re: Perl style examples (summary)
- From: Patricia Shanahan <pats@xxxxxxx>
- Date: Sat, 20 May 2006 17:13:33 GMT
Patricia Shanahan wrote:
....
I'm looking for examples of code a skilled Perl programmer would be....
delighted to see if asked to modify an existing program. I don't care
what it does, just how well it does it.
Also, are there books on Perl programming that focus on style and good
habits, and that are generally recommended?
Thanks to everyone who responded. It has been a very helpful discussion.
It seems to be winding down now, so here is a summary and my conclusions.
Suggested pieces of code:
========================
Code examples in Randal L Schartz columns at
http://www.stonehenge.com/merlyn/columns.html (John W. Krahn)
For CGI: http://users.easystreet.com/ovid/cgi_course/ (John W. Krahn)
John Krahn also mentions http://cpan.org, but that has both good and bad
style.
XML Xpath (Malcom Dew-Jones)
http://search.cpan.org/~stevan/ (Mark Thomas, good OO code, suggests
String::Tokenizer as something I can relate easily to other languages.)
Code posted by Jon Phipps.
Suggested books:
===============
"Perl Best Practices" by Damian Conway
http://www.oreilly.com/catalog/perlbp/(John W. Krahn, Sebastien Nadeau,
Janet Goldstein, Christian Winter, Adrian Howard. John Bokma has not
yet read it but plans to do so.)
Camel book 3rd edition (ISBN 0-596-00027-9) (Sebastien Nadeau - in
response to Jon Phipps, as a source for OO in Perl)
"Perl Cookbook" by Tom Christiansen and Nathan Torkington (Christian
Winter, for "examples of efficient and maintainable code)
"Perl Medic: Transforming Legacy Code" by Peter Scott (Adrian Howard)
"Programming Perl" (Ch. 24 - Common practices) (John Bokma)
perldoc perlstyle (John W. Krahn)
Conclusions:
===========
I've put "Perl Best Practices" by Damian Conway at the head of my
reading list. I'll select additional books after I've read that one.
I plan to look at the XML::Xpath and String::Tokenizer code. Although
the XML::Xpath code was criticized on grounds of how it handles
conditional return values, that turns out to be a debatable style issue.
Jon Phipps' coding style is better than a single blob of code, which is
how my first few attempts at Perl looked. However, the use of shared
global data seemed excessive to me, so I don't intend to emulate it.
Thanks again to everyone who posted.
Patricia
.
- References:
- Perl style examples
- From: Patricia Shanahan
- Perl style examples
- Prev by Date: Re: Perl style examples
- Next by Date: Slow -f test on Windows in recent Perl-versions
- Previous by thread: Re: Perl style examples
- Next by thread: how to use imap->message_to_file
- Index(es):
Relevant Pages
|