Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: CPAN's perltidy to the rescue!

by davido (Archbishop)
on Jul 13, 2012 at 19:06 UTC ( #981705=note: print w/replies, xml ) Need Help??

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. :)


Replies are listed 'Best First'.
Re^2: CPAN's perltidy to the rescue!
by Riales (Hermit) on Jul 13, 2012 at 19:32 UTC

    That's the sort of thing nobody can agree on; here's how I like to see it:

    my @stuff = qw/ some big list of items that spans several rows /;

    It's really awesome that perltidy lets you customize all that!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981705]
[roboticus]: Maybe use a squarified tree map tool (first google hit I got: https://windirstat .net/)
[Discipulus]: LanX TreeSize used to be useful.. but if is 9mb..;=)
[pryrt]: LanX, I like NirSoft SearchMyFiles for finding large / duplicate files...
[SuicideJunkie]: Windirstat is what we use here for nagging people who use up the transfer share.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-09-20 16:56 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (237 votes). Check out past polls.