Syntax highlighting in Perl

Nik Clayton nik at ngo.org.uk
Mon Oct 16 16:52:56 BST 2006


Jody Belka wrote:
> On Sat, Oct 14, 2006 at 05:27:53PM -0600, Randy J. Ray wrote:
>> Though it isn't a Perl module, I use highlight:
>>
>> 	http://freshmeat.net/projects/highlight/
>>
>> It does a *lot* of languages, and handles several output formats. It also acts
>> like a proper *NIX citizen, working as a filter when no explicit input or
>> output arguments are given. You could easily use this within the context of
>> Open2 or Open3.
> 
> It also comes with a makefile rule to generate a perl module using SWIG. See
> http://www.andre-simon.de/dokuwiki/doku.php?id=en:swig#perl_script

If anyone has a spare moment, could they see if the this (the SWIG 
bindings) works for them?  It works with Python, but the Perl example 
fails with

     TypeError in method 'CodeGenerator_getInstance', argument 1 of type
         'highlight::OutputType'

in call to highlightc::CodeGenerator_getInstance (on FreeBSD with Perl 
5.8.8)

N


More information about the london.pm mailing list