in reply to Re: new version of emacs cperl-mode available for testing
in thread new version of emacs cperl-mode available for testing

Aarrgghh!

It seems between cperl-mode v5.0 and v5.3 something broke. I have a file with perl code that sends my emacs into a tight CPU spin and the only way out is to kill emacs-x!

Every version of cperl-mode from v5.3 onwards appears to exhibit this behaviour on my particular text file. I can't show you this file, however, because it is corporate code :(

I've tried v5.3 v5.10 v5.12 v5.13 and they all die when trying to load this file.. v5.0 and v4.23 work fine.. What changed between v5.0 and v5.3..

update: it appears that having space characters on empty lines following a piece of code takes an exponentially long time to process (depending on how many space characters there are).. The following code exhibits this problem:

#.-*-CPerl-*- { ....foreach.(.qw(.hello.goodbye.).).{ ........if ( 1 ) { ............my ...... ............
but be sure to s/./ /sg before loading this into cperl-mode! You'll note that every space character you add to the 2nd last line will take an exponentially longer time to process.

update: after e-mailing Ilya Zakharevich yesterday I've already had a response, and v5.14 of cperl-mode has been released which handles the scenario I wrote about here! Great stuff!