Maybe I need to clarify: My fixes have not been backported to Emacs 27.1.
Instead, cperl-mode.el from the master branch (which identifies as Emacs 28.1) contains some "compatibility functions" so that it works with Emacs 26.1. If in doubt, say C-h v cperl-version: It should notify that the variable is obsolete since 28.1.
Edited to add:
This is indeed a bug, and an old one, too. I didn't "see" it because it depends on the a somewhat random order how two functions are called but can reproduce it now.