Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: indent by 2 in example

...

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();
  }

...