cperl-mode

Can I use cperl-mode with perl-mode colorization?

The Emacs cperl-mode seems to get confused less than perl-mode, but the Skittles effect makes the thing unusable for me. Does anyone have or know of an example of a .emacs block that causes cperl-mode to use the colorization from perl-mode, ideally in a form readable enough that I can go back and turn back on the default colors one elem...

How do I stop auto-formatting in emacs cperl mode?

When I do indent-region in cperl-mode if ($x) { next; } Emacs reformats it to: if ($x) { next; } How can I make it stop doing that? Note: the question originally said that this reformatting happens when yanking. I have yank setup to indent-region as well. ...

Can I customize the indentation of ternary operators in emacs' cperl-mode?

In emacs cperl-mode, ternary operators are not treated specially. If you break them over multiple lines, cperl-mode simply indents each line the same way it indents any continued statement, like this: $result = ($foo == $bar) ? 'result1' : ($foo == $baz) ? 'result2' : ($foo == $qux) ? 'result3' : ($foo == $quu...

How do I adjust cperl mode indentation in Emacs to match Moose examples?

How can I set up cperl mode in Emacs so that the indentation after brackets, e.g. has 'name' => ( is => 'rw', isa => 'Str', required => 1, ); (default indentation) becomes more like that seen in, for example, the Moose manual, e.g. has 'password' => ( ...

How do I adjust cperl mode indentation of qw//?

Following on from this question, here's another bugbear. I am getting my @browsers = qw/ Firefox MSIE /; but I want my @browsers = qw/ Firefox MSIE /; What setting in cperl mode in Emacs might I use to achieve that? ...

Emacs CPerl mode: bug in indent-region

I edit my Perl scripts in Emacs, using CPerl mode. But the Emacs function indent-region is broken in that mode. If I have a variable: my $num_elements; it becomes my $num_ elements; It's very annoying, especially since I am used to using underscores in variable names, and I press the keyboard shortcut for indent-region all the tim...

How can I make emacs' cperl-mode indent all statement continuations by only one level?

In emacs' cperl-mode, lines that continute a statement from a previous line are indented by one level: my $var = (1+1) * (2+2) / (3+3); However, if the statement does not begin at zero indentation because it is inside a block, then if you break your statement onto a third line, you get another level of indentation, and so on: s...