Subject: Re: bug#76868: 29.4; cperl-mode __END__ is incorrectly handled

From: Mauro Aranda <[email-masked]>
Date: Sat, 8 Mar 2025 12:51:16 -0300

On 8/3/25 12:34, John Ciolfi via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:
 >
 > Hi
 >
 > Given the following cperl-mode program, test.pl
 >
 >      # -*- mode: cperl; -*-
 >      print "hello\n";
 >      __END__
 >      This is not
 >        perl code!
 >
 > The lines after the __END__ are treated as perl code. They are 
syntactically colored and indented
 > which is incorrect. In perl, __END__ defines the end of the Perl code 
in the file. Any text that
 > appears after __END__ is ignored by the Perl compiler.
 >
 > All lines after __END__ should be treated as comments.
 >

Any chance that the option cperl-fontify-trailer helps here?

I remember reporting something similar in:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66161