Syntax highlighting in Perl

Nik Clayton nik at ngo.org.uk
Sun Oct 15 10:29:47 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

That looks very interesting, thanks to you both.

One question -- when it does the swig build, the makefile that ships with it 
has this definition:

     PERL_INC=/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/

That's not going to work on my FreeBSD box.  The equivalent path is:

     /usr/local/lib/perl5/5.8.8/mach/CORE

poking around Config.pm (and Config_heavy.pm) I don't see a variable that 
corresponds to that.  The closest I get is doing something like this:

     perl -MConfig -e 'print $Config{archlib}, "/CORE\n"'

Is that (archlib) the right variable to use?  Can I always append "/CORE" 
and be guaranteed of getting the right directory?

N


More information about the london.pm mailing list