I would like to advertise cperl-mode.el from the repository as a
workaround for bug#70948. This can be achieved by safeguarding
the call to derived-mode-add-parents with a version check.
* lisp/progmodes/cperl-mode.el: Call derived-mode-add-parents only
if it is available.
(cherry picked from commit
96269209a3e22707635239d057be4feac217b4bc)
;; Setup Flymake
(add-hook 'flymake-diagnostic-functions #'perl-flymake nil t))
-(derived-mode-add-parents 'cperl-mode '(perl-mode))
+(when (fboundp 'derived-mode-add-parents) ; to run under Emacs <30
+ (derived-mode-add-parents 'cperl-mode '(perl-mode)))
(defun cperl--set-file-style ()
(when cperl-file-style