This code:
$db->txn(sub {
...
});
becomes:
$db->txn(
sub {
...
}
);
wasting too much vertical space. Using anon subs on calls is a common pattern now, so it adds up.
Yeah, I need a test suite for my .perltidyrc...
# My (almost) perfect perl tidy config file | |
-l=100 # Max line width is 100 cols - We are not on vt100 line terminals anymore | |
-i=2 # Indent level is 2 cols | |
-ci=2 # Continuation indent is 2 cols | |
-se # Errors to STDERR | |
-vt=2 # Maximal vertical tightness | |
-cti=0 # No extra indentation for closing brackets | |
-pt=2 # High parenthesis tightness | |
-bt=2 # High brace tightness | |
-sbt=2 # High square bracket tightness | |
-bbt=1 # Medium block brace tightness | |
-nsfs # No space before semicolons | |
-nolq # Don't outdent long quoted strings | |
-b # we use version control, so just rewrite the file | |
# Break before all operators | |
-wbb="% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" | |
## More tweaks | |
--warning-output # Show warnings | |
--maximum-consecutive-blank-lines=2 # default is 1 | |
--nohanging-side-comments # troublesome for commented out code | |
# block comments may only be indented if they have some space characters before the # | |
-isbc |
This code:
$db->txn(sub {
...
});
becomes:
$db->txn(
sub {
...
}
);
wasting too much vertical space. Using anon subs on calls is a common pattern now, so it adds up.
Yeah, I need a test suite for my .perltidyrc...