/[cvs]/nfo/perl/scripts/outlook2ldap/libs/loadConfig.pm
ViewVC logotype

Contents of /nfo/perl/scripts/outlook2ldap/libs/loadConfig.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sun Jan 19 07:46:03 2003 UTC (21 years, 5 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
- refactored to libs/Torus/Config.pm

1 package loadConfig;
2
3 use strict;
4 use warnings;
5
6 use AppConfig qw(:expand :argcount);
7
8 require Exporter;
9 our @ISA = qw(Exporter);
10 our @EXPORT = qw( $config );
11
12 # ==================================
13 # setup configuration
14 # ==================================
15
16 our $config;
17
18 sub raiseAppConfigError {
19 my $error = shift;
20 print "error while accessing configuration-data: ", $error, "\n";
21 }
22
23 my $cfgfile_name = '../etc/syncOutlookContacts.ini';
24 $config = AppConfig->new({
25 CASE => 1,
26 ERROR => \&raiseAppConfigError,
27 GLOBAL => {
28 #DEFAULT => "<unset>",
29 DEFAULT => "",
30 ARGCOUNT => ARGCOUNT_ONE,
31 },
32 CREATE => 1,
33 });
34 #$config->define("debug_level", { ARGCOUNT => ARGCOUNT_ONE } );
35 $config->define("mapi_ProfilePass", { ARGCOUNT => ARGCOUNT_NONE, DEFAULT => "" } );
36 $config->define("sync_map", { ARGCOUNT => ARGCOUNT_LIST } );
37 $config->define("sync_mapping", { ARGCOUNT => ARGCOUNT_HASH } );
38
39 $config->define("folders_use", { ARGCOUNT => ARGCOUNT_LIST } );
40 $config->define("folders_map", { ARGCOUNT => ARGCOUNT_HASH } );
41
42 if (! -e $cfgfile_name) {
43 print "config-file \"$cfgfile_name\"does not exist.", "\n";
44 exit;
45 }
46 $config->file($cfgfile_name);
47
48 # ==================================
49
50 1;

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed