Skip to main content.
home | support | download

Back to List Archive

using DefaultHighlight

From: J Robinson <jrobinson852(at)not-real.yahoo.com>
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, 
'swishdescription');
 print "$ret\n";


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

Many thanks in advance,
  jrobinson

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Received on Tue Sep 2 16:55:25 2003