Skip to main content.
home | support | download

Back to List Archive

using DefaultHighlight

From: J Robinson <jrobinson852(at)>
Date: Tue Sep 02 2003 - 16:53:55 GMT
Hello All,

I'm interested in using the SWISH::DefaultHighlight
module independently from swish.cgi, but I can't quite
figure out how to invoke it. The naive and minimal:

 #!/bin/perl -w
 use strict;

 use lib '/usr/local/lib/swish-e/perl';
 use SWISH::DefaultHighlight;

 my $text = "some long text here ";

 my @phrases = qw(some text);
 my %settings = ();
 my %headers = ();

 my $sho = new SWISH::DefaultHighlight( {}, {} );
 my $ret = $sho->highlight(\$text, \@phrases, 
 print "$ret\n";

Clearly doesn't work. Can someone offer a short
working example of how to invoke
SWISH::SimpleHighlight without using it with

Many thanks in advance,

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Received on Tue Sep 2 16:55:25 2003