diff options
| author | fukachan <fukachan> | 2001-03-14 03:46:47 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-03-14 03:46:47 +0000 |
| commit | f0c8836292de3f33baa9d20577e7147d4aa3c9c2 (patch) | |
| tree | 32bcdff5aeaa3c7e86eec7fb534a3e2e49be8de3 | |
| parent | 682d54f983445e896e0dcef378cadc616f65d70d (diff) | |
| download | fml8-f0c8836292de3f33baa9d20577e7147d4aa3c9c2.tar.gz fml8-f0c8836292de3f33baa9d20577e7147d4aa3c9c2.tar.bz2 fml8-f0c8836292de3f33baa9d20577e7147d4aa3c9c2.zip | |
split FML::MemberControl to FML::Command/$method.pm for each $method
| -rw-r--r-- | fml/lib/FML/Command/add.pm | 86 | ||||
| -rw-r--r-- | fml/lib/FML/Command/delete.pm | 78 | ||||
| -rw-r--r-- | fml/lib/FML/Command/newml.pm | 77 | ||||
| -rw-r--r-- | fml/lib/FML/MemberControl.pm | 50 |
4 files changed, 246 insertions, 45 deletions
diff --git a/fml/lib/FML/Command/add.pm b/fml/lib/FML/Command/add.pm new file mode 100644 index 00000000..91682b70 --- /dev/null +++ b/fml/lib/FML/Command/add.pm @@ -0,0 +1,86 @@ +#-*- perl -*- +# +# Copyright (C) 2001 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. +# +# $Id$ +# $FML$ +# + +package FML::Command::add; +use strict; +use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); +use Carp; + +=head1 NAME + +FML::Command::add - add a new member + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head1 METHODS + +=head2 C<new()> + +=cut + +sub new +{ + my ($self) = @_; + my ($type) = ref($self) || $self; + my $me = {}; + + print STDERR " FML::Comand::add::new() \n"; + + return bless $me, $type; +} + + +=head2 C<add( $address )> + +=cut + + +sub add +{ + my ($self, $curproc, $address) = @_; + my $config = $curproc->{ config }; + my $member_map = $config->{ primary_member_map }; + my $recipient_map = $config->{ primary_recipient_map }; + + # fundamental check + croak("\$member_map is not specified") unless $member_map; + croak("\$recipient_map is not specified") unless $recipient_map; + + use IO::MapAdapter; + my $obj = new IO::MapAdapter $member_map; + $obj->add( $address ); + + $obj = new IO::MapAdapter $recipient_map; + $obj->add( $address ); +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 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. + +=head1 HISTORY + +FML::MemberControl appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + + +1; diff --git a/fml/lib/FML/Command/delete.pm b/fml/lib/FML/Command/delete.pm new file mode 100644 index 00000000..c1717ac0 --- /dev/null +++ b/fml/lib/FML/Command/delete.pm @@ -0,0 +1,78 @@ +#-*- perl -*- +# +# Copyright (C) 2001 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. +# +# $Id$ +# $FML$ +# + +package FML::Command::delete; +use strict; +use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); +use Carp; + +=head1 NAME + +FML::Command::delete - add a new member + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head1 METHODS + +=head2 C<new()> + +=cut + +sub new +{ + my ($self) = @_; + my ($type) = ref($self) || $self; + my $me = {}; + return bless $me, $type; +} + + +sub delete +{ + my ($self, $curproc, $address) = @_; + my $config = $curproc->{ config }; + my $member_map = $config->{ primary_member_map }; + my $recipient_map = $config->{ primary_recipient_map }; + + # fundamental check + croak("\$member_map is not specified") unless $member_map; + croak("\$recipient_map is not specified") unless $recipient_map; + + use IO::MapAdapter; + my $obj = new IO::MapAdapter $member_map; + $obj->delete( $address ); + + $obj = new IO::MapAdapter $recipient_map; + $obj->delete( $address ); +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 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. + +=head1 HISTORY + +FML::MemberControl appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + + +1; diff --git a/fml/lib/FML/Command/newml.pm b/fml/lib/FML/Command/newml.pm new file mode 100644 index 00000000..070fed3d --- /dev/null +++ b/fml/lib/FML/Command/newml.pm @@ -0,0 +1,77 @@ +#-*- perl -*- +# +# Copyright (C) 2001 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. +# +# $Id$ +# $FML$ +# + +package FML::Command::newml; +use strict; +use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); +use Carp; + +=head1 NAME + +FML::Command::newml - make a new mailing list + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head1 METHODS + +=head2 C<new()> + +=cut + +sub new +{ + my ($self) = @_; + my ($type) = ref($self) || $self; + my $me = {}; + return bless $me, $type; +} + + +=head2 C<newml( $ml_name )> + +=cut + + +sub newml +{ + my ($self, $curproc, $ml_name) = @_; + my $config = $curproc->{ config }; + my $member_map = $config->{ primary_member_map }; + my $recipient_map = $config->{ primary_recipient_map }; + + # fundamental check + croak("\$ml_name is not specified") unless $ml_name; + + my $ml_home_prefix = $curproc->{ ml_home_prefix }; +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 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. + +=head1 HISTORY + +FML::MemberControl appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + + +1; diff --git a/fml/lib/FML/MemberControl.pm b/fml/lib/FML/MemberControl.pm index 74b83609..6cbad869 100644 --- a/fml/lib/FML/MemberControl.pm +++ b/fml/lib/FML/MemberControl.pm @@ -27,6 +27,11 @@ FML::MemberControl - controller =cut +use FML::Command::add; +use FML::Command::delete; + +@ISA = qw(FML::Command::add FML::Command::delete); + sub new { my ($self) = @_; @@ -36,51 +41,6 @@ sub new } -=head2 C<add( $address )> - -=cut - - -sub add -{ - my ($self, $curproc, $address) = @_; - my $config = $curproc->{ config }; - my $member_map = $config->{ primary_member_map }; - my $recipient_map = $config->{ primary_recipient_map }; - - # fundamental check - croak("\$member_map is not specified") unless $member_map; - croak("\$recipient_map is not specified") unless $recipient_map; - - use IO::MapAdapter; - my $obj = new IO::MapAdapter $member_map; - $obj->add( $address ); - - $obj = new IO::MapAdapter $recipient_map; - $obj->add( $address ); -} - - -sub delete -{ - my ($self, $curproc, $address) = @_; - my $config = $curproc->{ config }; - my $member_map = $config->{ primary_member_map }; - my $recipient_map = $config->{ primary_recipient_map }; - - # fundamental check - croak("\$member_map is not specified") unless $member_map; - croak("\$recipient_map is not specified") unless $recipient_map; - - use IO::MapAdapter; - my $obj = new IO::MapAdapter $member_map; - $obj->delete( $address ); - - $obj = new IO::MapAdapter $recipient_map; - $obj->delete( $address ); -} - - =head1 AUTHOR Ken'ichi Fukamachi |
