Subject: | braces not handled right for multilevel hash |
The following is how I like my multi-level hashes formatted:
my %hash = (
a => {
bbbbbbbbb => {
cccccccccc => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
},
},
);
But when perltidy is run on it, or a non-formatted version, this is
produced instead:
my %hash = (
a => {
bbbbbbbbb =>
{ cccccccccc => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', },
},
);
Note the opening and closing brace have condensed onto the same line. I
like that to only happen if the key AND value can both fit on the same
line like in this example:
my %hash = (
a => {
bbbbbbbbb => { c => 'xxxxxxxxxxxxxxxxxxxxxxxx', },
},
);
I tested this with the default perltidy settings. I also experimented
with a variety of other settings but they also produced the same results.