/[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 30 by dpavlin, Sun May 9 00:09:32 2004 UTC revision 41 by dpavlin, Mon May 10 20:26:17 2004 UTC
# Line 4  package MWS; Line 4  package MWS;
4    
5  use strict;  use strict;
6  use warnings;  use warnings;
 use Carp;  
7    
8    use lib '.';
9    
10    use Carp;
11  use Mail::Box::Manager;  use Mail::Box::Manager;
12  use Config::IniFiles;  use Config::IniFiles;
13  use POSIX qw(strftime);  use POSIX qw(strftime);
# Line 16  use Date::Parse; Line 18  use Date::Parse;
18  use POSIX qw(strftime);  use POSIX qw(strftime);
19  use MIME::Base64;  use MIME::Base64;
20    
 #use MWS_plucene;  
 use MWS_swish;  
   
 require Exporter;  
   
 our @ISA = qw(Exporter);  
   
 our %EXPORT_TAGS = ();  
 our @EXPORT_OK;  
 our @EXPORT;  
   
21  our $VERSION = '1.00';  our $VERSION = '1.00';
22    
23  my $folder;     # placeholder for folders  my $folder;     # placeholder for folders
# Line 35  my $debug = 1; Line 26  my $debug = 1;
26    
27  sub new {  sub new {
28          my $class = shift;          my $class = shift;
29          my $self = {};          my $self = {@_};
30          bless($self, $class);          bless($self, $class);
31    
         my $config_file = shift || die "need index file";  
32    
33          $self->{config} = new Config::IniFiles( -file => $config_file );          my $config_name = $self->{config_file} || croak "need config_file";
34            $config_name =~ s/\.conf.*$//;
35            $self->{config_name} = $config_name;
36    
37          $self->{config_file} = $config_file;          $self->{config} = new Config::IniFiles( -file => $self->{config_file} );
         $config_file =~ s/\.conf.*$//;  
         $self->{config_name} = $config_file;  
38    
39          my $index_dir = $self->{config}->val('global', 'index') || croak "can't find [index] section in config file with path of index";          my $index_dir = $self->{config}->val('global', 'index') || croak "can't find [index] section in config file with path of index";
40    

Legend:
Removed from v.30  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.26