jrockway/cperl-mode — pull request #12 by schwern (2012-12-27 00:55:02+00:00)
Title: Patch continued statement indentation when inside a block.

See http://stackoverflow.com/a/14043345/14660 for discussion and original patch. The patch is by http://stackoverflow.com/users/850781/sds The staircase bug is also [discussed on the EmacsWiki](http://www.emacswiki.org/emacs/IndentingPerl#toc3).

For example, with this in .emacs

(setq cperl-indent-level 4 ; 4 character indents
cperl-indent-parens-as-block t ; indent parens like blocks
cperl-continued-statement-offset 2
cperl-continued-brace-offset 0
cperl-close-paren-offset -4
cperl-tabs-always-indent nil
)

Without the patch it indents like this.

role {
has foo =>
is => 'rw',
isa => 'Int',
default => 0;
}

With the patch it indents correctly.

role {
has foo =>
is => 'rw',
isa => 'Int',
default => 0;
}

Note the presense of a block around the statement is necessary. Without the block
the bug does not appear.