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

Diff of /trunk/MWS.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by dpavlin, Wed May 5 15:38:35 2004 UTC revision 9 by dpavlin, Thu May 6 07:32:24 2004 UTC
# Line 6  use strict; Line 6  use strict;
6  use warnings;  use warnings;
7  use Carp;  use Carp;
8    
 use Plucene::Simple;  
9  use Mail::Box::Manager;  use Mail::Box::Manager;
10  use Config::IniFiles;  use Config::IniFiles;
11    use MWS_plucene;
12    
13  require Exporter;  require Exporter;
14    
# Line 36  sub new { Line 36  sub new {
36    
37          my $index_file = $self->{config}->val('global', 'index') || croak "can't find [index] section in config file with path of index";          my $index_file = $self->{config}->val('global', 'index') || croak "can't find [index] section in config file with path of index";
38    
39          $self->{index} = Plucene::Simple->open($index_file) || croak "can't open index '$index_file': $!";          $self->{index} = $self->open_index($index_file);
40    
41          $self->{mgr} = Mail::Box::Manager->new;          $self->{mgr} = Mail::Box::Manager->new;
42    
# Line 78  sub search { Line 78  sub search {
78    
79          my $s = shift || carp "search called without argument!";          my $s = shift || carp "search called without argument!";
80    
81          my @index_ids = $self->{index}->search($s);          my @index_ids = $self->search_index($s);
82    
83          $self->{'index_ids'} = \@index_ids;          $self->{'index_ids'} = \@index_ids;
84    

Legend:
Removed from v.8  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26