Syntax highlighting in Perl

Aaron Crane perl at aaroncrane.co.uk
Sun Oct 15 01:58:17 BST 2006


Nik Clayton writes:
> Can anyone recommend any modules (or an external tool that's efficient) 
> that can do HTML syntax highlighting -- at least diffs, but ideally source 
> code in various languages, HTML itself, and so on.

I quite like Text::VimColor, which shells out to Vim to do the actual
work of syntax-highlighting.

> I've looked at Syntax::Highlight::Engine::Kate, but it looks as though if I 
> want to change the look of the highlighting I need to subclass a bunch of 
> modules, which is effort I'd like to avoid if possible.

Text::VimColor will give you HTML (with CSS classes for styling as you
see fit), or a simple XML format, or a Perl data structure.

-- 
Aaron Crane


More information about the london.pm mailing list