Subject: [Patch] Don't let perl indentation get fooled by =cut

From: Tom Willemse <[email-masked]>
Date: Thu, 15 Oct 2015 00:05:07 +0200

Hey,

The attached patch fixes indentation for the situation described above
in the master branch.

Cheers,

Tom

>From f9296dc710998577434959f7d5af30792cb2df26 Mon Sep 17 00:00:00 2001
From: Tom Willemse <[email-masked]>
Date: Mon, 12 Oct 2015 00:45:49 +0200
Subject: [PATCH] Fix indenting in perl functions with doc-comments

* lisp/progmodes/perl-mode.el (perl-calculate-indent): Skip doc-comments
as well as comments and skip the entire comment, not just the line.
---
 lisp/progmodes/perl-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 55d69bf..b4d7127 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -946,8 +946,8 @@ Returns (parse-state) if line starts inside a string."
            ;; Skip over comments and labels following openbrace.
            (while (progn
                     (skip-chars-forward " \t\f\n")
-                    (cond ((looking-at ";?#")
-                           (forward-line 1) t)
+                    (cond ((looking-at ";?#\\|^=\\w+")
+                           (forward-comment 1) t)
                           ((looking-at "\\(\\w\\|\\s_\\)+:[^:]")
                            (setq colon-line-end (line-end-position))
                            (search-forward ":")))))
-- 
2.6.1