2009/3/9 <r...@i.frys.com>: > Jerald Sheets wrote: >> >> On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote: >> >>> On Mar 4, 4:46 am, que...@gmail.com (Jerald Sheets) wrote: >>>> >>>> I really think you're doing yourself a disservice by just throwing >>>> your program commands on lines, not indenting according to best >>>> practices. It makes your code unreadable, and can make it very hard >>>> to debug the more involved your programs get. >>>> >>> [snip] >>> >>>> Consider picking up Damian's book: >>>> >>>> http://oreilly.com/catalog/9780596001735/index.html >>>> >>>> It'll serve you well and is a must have for the serious perl >>>> programmer. >>>> >>> I agree, however your code as shown below doesn't follow "Perl Best >>> Practices". >>> >>> You use improper indentation, and failed to use vertical whitespace >>> making it harder to read/follow. >>> >>>> #!/usr/bin/perl -w >>>> >>> It's better to use the warnings pragma, instead of the -w switch >> >> > [snip] > >> Whether fully complying with Damian's book or not, you cannot argue >> the difference in readability (my point of the messages) in comparison >> to what was offered. > > Actually, I can make that argument. The readability of your code wasn't any > better than the OP's. In fact yours was more confusing due to the improper > use of indentation. Indentation is done at the block level and when breaking > up a long statement across multiple lines. Your indentation made me think I > missed an initialization of a block which made me re-read that portion of code > each time you indented. > > [snip] >> >> However on the -w switch, here are Damian's words:
I hope I am not hijacking this topic any more that it already has been :) but has what are people's thoughts on the perlcritic. I haven't used it myself. Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/