Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • First, make sure that you have the latest cperl-mode. A lot of distributions don't include the latest one. Your file cperl-mode.el should be at least version 4.32. Find it on CPAN (I think). That fixes some problems with indentation.

    My indenting style is probably different than yours, but this from my ~/.emacs might at least give you some ideas:

    (custom-set-variables
       '(cperl-label-offset 0)
       '(cperl-indent-level 4)
       '(cperl-continued-statement-offset 2)
       '

  • First, make sure you've got cperl-mode [emacswiki.org] 5.0. Then, have a look at the cperl-indent-parens-as-block setting. That'll fix the first one, but I don't know how to do the second.

    -Dom

  • You could sidestep the issue and use perltidy on your code. It tends to be smarter than cperl-mode on the whole, and is very configurable.