Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • The one I use attempts to mark the current function if you haven't explicitly marked anything. Otherwise, it runs it over the whole file (not sure why).
    (defun perltidy ()
      "Run perltidy on the current region or buffer."
        (unless mark-active (mark-defun))
        (shell-command-on-region (point) (mark) "perltidy -q" nil t)))


  • Yes... but that's in the README. I think the most useful part of the thing is that it's a minor mode so it can be automatic but it did also include just the plain "perltidy this region or the entire buffer" code.

    It also goes to a little bit of trouble to fix things if you don't have a perltidy binary but have called it anyway.