


“Writing it is easy, understanding it is hard.”
—Anonymous
Thou shalt not wrap useless parentheses around entire case expressions.
Thou shalt not wrap useless parentheses around entire rule patterns.
The canonical layouts are
case expression
#
pattern => expression;
pattern => expression;
pattern => expression;
...
esac;
case expression
#
pattern
=>
{ statement;
statement;
statement;
...
};
pattern
=>
{ statement;
statement;
statement;
...
};
pattern
=>
{ statement;
statement;
statement;
...
};
...
esac;
Avoid mixing the two models. If you must have both mono-line and multi-line alternatives within the same case, group the mono-line alternatives together at the top if possible.


