Picking an editor is often not only a matter of "what suits me better" but also a religious thing. I tend to only look to the first aspect and - after using many different editors (Eclipse, Komodo, vim, emacs, ...) I decided to stick with Geany. It's a multiplatform GUI editor which is lightweight, handy to use, and offers the features I need. When I do not have a GUI available (fex. when working via SSH) I still use vim.
With MooseX::Declare (and CatalystX::Declare and Sub::Curried and many other modules) we now have new keywords in Perl, some of which were much awaited. It would be for Geany to show them highlighted with the proper colour. To achieve this, we can (easily) tweak the syntax highlighting system.
My explanation here applies to Unix system, but it's valid everywhere provided you use the correct system-specific paths.
If you just want the file and skip the explanation, click here to download the patched filetypes.perl (original from Geany 0.18 dist). :-)
Syntax definitions are kept in a system-wide directory (it's /usr/share/geany in my system) and are named in a filetypes.language fashion, fex. filetypes.haskell. If you edit these files directly, they will affect all users in the system: it is, however, a discouraged practice as upgrading to a new Geany version could mangle your changes depending on how your package manager works. The best option is to copy one of those files in your ~/.config/geany/filedefs directory; in our case:
cp /usr/share/geany/filetypes.perl ~/.config/geany/filedefs/
The file in your home directory will override the system-wide one. To add highlighting for the new keywords look for the:
section in the file and add whatever you want to the primary variable. I added:
class, method, extends, before, after, around, override, augment, role, with
At this point, you're done: just launch Geany again.
It looks like it's not possible to specify a regular expression for a keyword, like /is\s+mutable/. This would allow to give colour also to is mutable and is dirty. I'll ask the Geany community about that.
On Geany upgrades, be careful to check if there were changes in the original filetypes.perl and merge them.