...
elsif and else are uncuddled, no spaces on the inside of paretheses, and try to avoid one-liner conditionals that require braces. If braces are needed, use multiple lines. Open braces should appear on the same line of the condition, unless it's a multiple line condition. For example:
No Format |
---|
if ($foo) { do_foo(); } elsif ($bar_really_long_condition_that_lasts_longer_than_40_columns && $foo_really_long_condition_that_lasts_longer_than_40_columns) { do_bar(); } else { do_else(); } |
- (status of this guideline: proposed by DanielQuinlan. everyone happy with it?)
- (+1 – JustinMason)
...