/[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 7 by dpavlin, Wed May 5 15:38:35 2004 UTC revision 12 by dpavlin, Thu May 6 12:40:11 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    use MWS_swish;
13    
14  require Exporter;  require Exporter;
15    
# Line 36  sub new { Line 37  sub new {
37    
38          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";
39    
40          $self->{index} = Plucene::Simple->open($index_file) || croak "can't open index '$index_file': $!";          $self->{mgr} = Mail::Box::Manager->new(access => 'r');
41            $self->{index_file} = $index_file;
         $self->{mgr} = Mail::Box::Manager->new;  
42    
43          # placeholder for opened folders          # placeholder for opened folders
44          $self->{folder} = {};          $self->{folder} = {};
# 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.7  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.26