Rolf, I would expect those lines not to change at all.
Eily, thanks -msc pointed me in the right direction.
After some more experimenting, I've found that this code:
$d->{status} = 'queued'; # something
$d->{description} = 'The action'; # other thing
$d->{id} = '12345'; # Identifies action
gets changed to this:
$d->{status} = 'queued'; # something
$d->{description} = 'The action'; # other thing
$d->{id} = '12345'; # Identifies action
...which is definitely better in that case.
But even if only the last line had a comment and I use -msc=1:
$d->{status} = 'queued';
$d->{description} = 'The action';
$d->{id} = '12345'; # Identifies action
...it still pushes the comment way out to the right to align with some non-existent other comments. That's not necessary.
$d->{status} = 'queued';
$d->{description} = 'The action';
$d->{id} = '12345'; # Identifies action
Setting -ols/-nolc don't seem to have any effect on this.
And now I've found what I was looking for:
-ssc -sscp=#
This sets "static side comments", and sets the identifier for those to the usual # character
docs:
http://perltidy.sourceforge.net/perltidy.html#static_side_comments
This lines up the equals but leaves the comments alone. The only time the equals doesn't get lined up is if that would make the line longer than the -l setting, which is fair enough.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.