in reply to CPAN's perltidy to the rescue!
I agree. I think perltidy is great. (That's perltidy for the search-impared).
I feel more productive when I keep my code formatted reasonably well as I'm working with it. But before significant commits (especially ones that will get merged back into a more stable branch), I usually pass it through perltidy first (This works out best if everyone plays by the same rules, or else your 'git diff' becomes a log of all the changes perltidy made, and the potential for merge rejects increases). Often when I compare what I thought was reasonable formatting with what perltidy comes up with, I have to agree with its assessment. But there's a consistent issue that always bugged me. It has to do with how it chooses to indent a qw// list (by default). Here's a contrived example:
# How I like to see it. my @stuff = qw( some big list of items that spans several rows ); # How perltidy likes to see it. my @stuff = qw( some big list of items that spans several rows );
Finally it annoyed me enough that I dug into the docs and discovered the -ntqw command line switch. Much happier now. :)
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: CPAN's perltidy to the rescue!
by Riales (Hermit) on Jul 13, 2012 at 19:32 UTC |