/[mws]/trunk/search.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/search.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations)
Tue May 4 15:47:14 2004 UTC (20 years ago) by dpavlin
File MIME type: text/plain
File size: 416 byte(s)
added CGI interface (slow), global configuration, templates

1 dpavlin 1 #!/usr/bin/perl -w
2    
3 dpavlin 2 use Data::Dumper;
4 dpavlin 3 use MWS;
5 dpavlin 4 use Template;
6 dpavlin 1
7     my $debug = 1;
8    
9 dpavlin 4 my $mws = MWS->new('global.conf');
10 dpavlin 1
11 dpavlin 2 my $s=join(" ",@ARGV);
12 dpavlin 1
13 dpavlin 2 my $results = $mws->search($s);
14 dpavlin 1 print "$results results...\n";
15    
16 dpavlin 4 my $t = Template->new({
17     INCLUDE_PATH => $mws->{config}->val('global', 'templates'),
18     });
19 dpavlin 1
20 dpavlin 4 my @res = $mws->fetch_all_results();
21    
22     $t->process("results.txt", {
23     query => $s,
24     results => \@res,
25     }) || die $t->error();
26    

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26