diff options
| author | fukachan <fukachan> | 2006-06-10 01:05:10 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-06-10 01:05:10 +0000 |
| commit | d42bb62b82c4ab76d4c046cbb345bdc408b4e913 (patch) | |
| tree | bcb883632a4b7a9f80c520e053695145cd668db0 /regress/tinymta/Config.pm | |
| parent | c34c9b2957bf84ba196e8ae3bc403d35acee05ad (diff) | |
| download | fml8-snap-20060610.tar.gz fml8-snap-20060610.tar.bz2 fml8-snap-20060610.zip | |
implement least function MTA for convenience, debug and simulation.snap-20060610
Diffstat (limited to 'regress/tinymta/Config.pm')
| -rw-r--r-- | regress/tinymta/Config.pm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/regress/tinymta/Config.pm b/regress/tinymta/Config.pm new file mode 100644 index 00000000..823678db --- /dev/null +++ b/regress/tinymta/Config.pm @@ -0,0 +1,35 @@ +#-*- perl -*- +# +# Copyright (C) 2006 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $FML$ +# + +package TinyMTA::Config; +use strict; +use Carp; + +# Descriptions: load configuration from $config_cf_file. +# Arguments: STR($config_cf_file) OBJ($main_cf) +# Side Effects: none +# Return Value: OBJ +sub load_file +{ + my ($config_cf_file, $main_cf) = @_; + + my $opts = {}; + for my $k (keys %$main_cf) { + my $key = sprintf("fml_%s", $k); + $opts->{ $key } = $main_cf->{ $k }; + } + + use FML::Config; + my $config = new FML::Config $opts; + $config->load_file($config_cf_file); + return $config; +} + + +1; |
