Perltidy problem

Ovid on 2005-12-14T23:02:42

If I have code like this:

#!/usr/bin/perl

my %hash = ( 
    some_long_key => { 
        INCLUDE_PATH => __PACKAGE__->path_to('www/templates/tt') 
    } 
);

I'd love it if perltidy stopped turning it into this:

#!/usr/bin/perl

my %hash = ( some_long_key =>
      { INCLUDE_PATH => __PACKAGE__->path_to('www/templates/tt') } );

I can tell perltidy to keep my whitespace, but I'd like to have it be smart about about formatting this in the first place. I've tried various switch combinations but can't quite seem to get this to work. Suggestions?


Tidy options

runrig on 2005-12-15T17:50:11

I get what you want with my .perltidyrc:
-l=60
-i=2
-ce
-se

Re:Tidy options

runrig on 2005-12-15T17:52:41

...and the only options above which make a difference in this case is the -l and -i options. Hmmm.