consider ezmlm-idx5

This commit is contained in:
lars 2005-12-26 15:30:20 +00:00
parent bf6c5d0c1f
commit 255cbdb494
2 changed files with 28 additions and 19 deletions

View file

@ -30,4 +30,6 @@ Revision history for Perl extension Mail::Ezmlm.
- fixed some tainting problems (Scott Beck <sbeck@gossamer-threads.com> and Matt Simerson <matt@tnpi.biz>) - fixed some tainting problems (Scott Beck <sbeck@gossamer-threads.com> and Matt Simerson <matt@tnpi.biz>)
- fixed order of control/defaulthost and control/me (bug 1515) - fixed order of control/defaulthost and control/me (bug 1515)
- fixed a bug in Makefile.PL (bug 11771). does not affect most users, so released as 0.05.1 - fixed a bug in Makefile.PL (bug 11771). does not affect most users, so released as 0.05.1
0.06 Mon Dec 26 18:55:12 CET 2005
- support for ezmlm-idx-5.0.0 added

View file

@ -51,7 +51,7 @@ require Exporter;
@EXPORT = qw( @EXPORT = qw(
); );
$VERSION = '0.05'; $VERSION = '0.06';
require 5.005; require 5.005;
@ -175,27 +175,34 @@ sub update {
# == Get a list of options for the current list == # == Get a list of options for the current list ==
sub getconfig { sub getconfig {
my($self) = @_; my($self) = @_;
my($options, $i); my($options, $i);
# Read the config file # Read the config file
if(open(CONFIG, "<$self->{'LIST_NAME'}/config")) { if(open(CONFIG, "<$self->{'LIST_NAME'}/dot")) {
while(<CONFIG>) { # this file exists since ezmlm-idx-5.0.0
if (/^F:-(\w+)/) { # 'config' is not authorative anymore since this version
$options = $1; $option = $self->_getconfigmanual_idx5();
} elsif (/^(\d):(.+)$/) { } elsif(open(CONFIG, "<$self->{'LIST_NAME'}/config")) {
$options .= " -$1 '$2'"; # 'config' contains the authorative information
} while(<CONFIG>) {
} if (/^F:-(\w+)/) {
close CONFIG; $options = $1;
} else { } elsif (/^(\d):(.+)$/) {
# Try manually $options .= " -$1 '$2'";
$options = $self->_getconfigmanual(); }
} }
close CONFIG;
} else {
# Try manually
$options = $self->_getconfigmanual_idx4();
}
($self->_seterror(-1, 'unable to read configuration in getconfig()') && return undef) unless (defined($options)); ($self->_seterror(-1, 'unable to read configuration in getconfig()') && return undef) unless (defined($options));
# Add the unselected options too # Add the unselected options too
# TODO: this is not especially great, as some options are undefined and cause an
# error, if you use it for update
foreach $i ('a' .. 'z') { foreach $i ('a' .. 'z') {
$options .= uc($i) unless ($options =~ /$i/i) $options .= uc($i) unless ($options =~ /$i/i)
} }
@ -508,7 +515,7 @@ sub _checkaddress {
} }
# == Internal function to work out a list configuration == # == Internal function to work out a list configuration ==
sub _getconfigmanual { sub _getconfigmanual_idx4 {
my($self) = @_; my($self) = @_;
my ($savedollarslash, $options, $manager, $editor); my ($savedollarslash, $options, $manager, $editor);