* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Detect
the "<<>>" operator (Bug#42455).
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-bug-45255): Verify that <<>> does not start a
HERE-doc.
;; ;; "\\([^= \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + 1
;; "\\(\\)" ; To preserve count of pars :-( 6 + 1
;; "\\)"
- ((match-beginning 3) ; 2 + 1
+ ((match-beginning 3) ; 2 + 1: found "<<", detect its type
(setq b (point)
tb (match-beginning 0)
c (and ; not HERE-DOC
(match-beginning 6)
(save-match-data
(or (looking-at "[ \t]*(") ; << function_call()
+ (looking-at ">>") ; <<>> operator
(save-excursion ; 1 << func_name, or $foo << 10
(condition-case nil
(progn
(let ((code "{ $a- / $b } # /"))
(should (equal (nth 8 (cperl-test-ppss code "/")) 7))))
+(ert-deftest cperl-test-bug-45255 ()
+ "Verify that \"<<>>\" is recognized as not starting a HERE-doc."
+ (let ((code (concat "while (<<>>) {\n"
+ " ...;\n"
+ "}\n")))
+ ;; The yadda-yadda operator should not be in a string.
+ (should (equal (nth 8 (cperl-test-ppss code "\\.")) nil))))
+
;;; cperl-mode-tests.el ends here