Skip Menu |

This queue is for tickets about the Perl-Tidy CPAN distribution.

Report information
The Basics
Id: 79813
Status: resolved
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: drago [...] yopmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.
Version 20121207 corrects this. -Steve