Emacs cperl-mode Perl6+MX::Declare news

I recently invested some tuits to rebase my Perl6 enhancements in Emacs cperl-mode to the latest version 6.2 that Ilya Zakharevich provides on his homepage.

After wading through tears and blood (well, it was more about different levels of fatigue) I felt strong enough to also finally merge "the other big branch"(tm) that Jonathan Rockway maintains for MooseX::Declare syntax enhancements.

The result is yet another branch mxd-perl6-merge on github. The leading version is ilyaz' (including useless whitespace left as is), then Perl6 adaptions, then MX::Declare which in turn also made some things more clever for the Perl6 changes.

If you ever tried one of the cperl-mode hacks for Perl6 or MooseX::Declare, please switch to this merge. It should work the same or even better for you. If not, report it to me.

7 Comments

I'd been glancing at the Git logs from time to time but haven't really checked this out until now. Is the intent to make something that's one mode for Perl5 + Moose + MooseX::Declare + Perl6?

From trying it out that seems to be the case. It renders all of the above. Obviously the Perl 6 part is much better, but I noticed a bunch of regressions on Perl 5 syntax that seemingly have to do with broken precedence rules.

E.g. on Hailo.pm it'll highlight use Any::Moose as if Any is a type keyword, qw( unless first last ) will highlight unless and last as keywords. Regex highlighting seems to be completely broken (no special colors at all) etc.

But this is a very interesting development. It's great that someone is doing a proper cperl-mode for modern Perl code and Perl 6. Where would you prefer bug reports for it to be sent?

Using the GitHub issue tracker would be one option.

Regarding where it broke, it's fine in the mx-declare branch, which is what I usually run.

Very cool. This is almost getting me motivated enough to write code to enable/disable certain highlighting features based on the actual code that's being edited -- no "use MooseX::Declare", no "class" highlighting; no "use 5.010", no "say" and "given/when", etc. I haven't figured out a good way to do this yet, but it's clear that it's needed :)

Leave a comment

About Renormalist

user-pic Born. Became programmer. Atari Basic, Pascal, C, C++, Java, Perl. In this order. :-) Played International Karate, Super Cobra, Loom, MechWarrior 1-4 and Quake 3. Studied computer science, Debian, Emacs, Perl. Active member of Dresden Perl Mongers.