I confess, I like ending all ifs/elses/subs with a semicolon. Call me a semicolon purist. Maybe it's that I do so much perl/c#/javascript that I just like being more consistent everywhere.
if (...) {
};
sub foo {
if (...) {
};
};
I'm trying perltidy...again, and quickly I start banging my head. When I add -ndsm to my rc, I get this:
if (...) {
}
;
sub foo {
if (...) {
}
;
};
My current rc is:
-l=78
-i=4
-ci=4
-bar
-ce
-nsbl
-sot
-sct
-pt=2
-sbt=2
-bt=2
-bbt=2
-nsfs
-asc
-ndsm
I'm sure there's no way to get what I want on this either:
$foo->bar(
$self->this($that, $other)
);
When using object->method as method params, I like the indent, otherwise, just put the params on the same line in ().
$foo->bar($this, $that);
How do I beat perltidy into submission?
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.