summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-08-26 05:46:33 +0000
committerfukachan <fukachan>2001-08-26 05:46:33 +0000
commit56e590f604349f574237d3024fb017358fe963fb (patch)
tree9298cf89397822e9cbe8830adc03d3c6268400bf /fml/lib/FML/Command
parent16c0298a7348d16878222a3f5fb180dc538bc96c (diff)
downloadfml8-56e590f604349f574237d3024fb017358fe963fb.tar.gz
fml8-56e590f604349f574237d3024fb017358fe963fb.tar.bz2
fml8-56e590f604349f574237d3024fb017358fe963fb.zip
moved to FML::Command::User
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/add.pm53
-rw-r--r--fml/lib/FML/Command/bye.pm54
-rw-r--r--fml/lib/FML/Command/edit.pm89
-rw-r--r--fml/lib/FML/Command/get.pm60
-rw-r--r--fml/lib/FML/Command/mget.pm60
-rw-r--r--fml/lib/FML/Command/newml.pm87
-rw-r--r--fml/lib/FML/Command/remove.pm54
-rw-r--r--fml/lib/FML/Command/resign.pm55
-rw-r--r--fml/lib/FML/Command/signoff.pm52
-rw-r--r--fml/lib/FML/Command/subscribe.pm73
-rw-r--r--fml/lib/FML/Command/unsubscribe.pm71
11 files changed, 0 insertions, 708 deletions
diff --git a/fml/lib/FML/Command/add.pm b/fml/lib/FML/Command/add.pm
deleted file mode 100644
index 93a53187..00000000
--- a/fml/lib/FML/Command/add.pm
+++ /dev/null
@@ -1,53 +0,0 @@
-#-*- 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.
-#
-# $FML: add.pm,v 1.6 2001/05/27 14:27:54 fukachan Exp $
-#
-
-package FML::Command::add;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use FML::Command::subscribe;
-@ISA = qw(FML::Command::subscribe);
-
-sub add
-{
- my ($self, $curproc, $optargs) = @_;
- $self->SUPER::subscribe($curproc, $optargs);
-}
-
-=head1 NAME
-
-FML::Command::add - add a new member
-
-=head1 SYNOPSIS
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=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::Command::add 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/bye.pm b/fml/lib/FML/Command/bye.pm
deleted file mode 100644
index 46427c87..00000000
--- a/fml/lib/FML/Command/bye.pm
+++ /dev/null
@@ -1,54 +0,0 @@
-#-*- 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.
-#
-# $FML: bye.pm,v 1.7 2001/05/27 14:27:54 fukachan Exp $
-#
-
-package FML::Command::bye;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use FML::Command::unsubscribe;
-@ISA = qw(FML::Command::unsubscribe);
-
-sub bye
-{
- my ($self, $curproc, $optargs) = @_;
- $self->SUPER::unsubscribe($curproc, $optargs);
-}
-
-
-=head1 NAME
-
-FML::Command::bye - remove the specified member
-
-=head1 SYNOPSIS
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=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::Command::bye 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/edit.pm b/fml/lib/FML/Command/edit.pm
deleted file mode 100644
index 3dac3b28..00000000
--- a/fml/lib/FML/Command/edit.pm
+++ /dev/null
@@ -1,89 +0,0 @@
-#-*- 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.
-#
-# $FML: edit.pm,v 1.5 2001/07/15 23:20:29 fukachan Exp $
-#
-
-package FML::Command::edit;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-=head1 NAME
-
-FML::Command::edit - edit a new member
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-See C<FML::Command> for more details.
-
-=head1 METHODS
-
-=head2 C<edit( $address )>
-
- TODO
-
-now we can read and write config.cf, not change it.
-
-=cut
-
-
-# Descriptions: edit config.cf
-# Arguments: $self $curproc $optargs
-# Side Effects: update config.cf
-# Return Value: none
-sub edit
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $options = $optargs->{ options };
- my $address = $optargs->{ address } || $options->[ 0 ];
- my $myname = $optargs->{ args }->{ myname };
-
- # ML's home directory
- my $ml_home_dir = $optargs->{ 'args' }->{ 'ml_home_dir' };
- my $config_cf = $ml_home_dir."/config.cf";
-
- use FML::Config;
- my $c = new FML::Config;
-
- # read configuration. configuration is holded in FML:Config space.
- $c->read( $config_cf );
-
- # modify $c (config) object
- # XXX TODO
- # XXX ... snip ...
- # $c->set('key', 'value'); # set up
- # $c->regist('key'); # add list to write into config.cf
-
- # ovewrite $config_cf
- # after old $config_cf is backup'ed to $config_cf.bak
- $c->write( $config_cf );
-}
-
-
-=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::Command::edit 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/get.pm b/fml/lib/FML/Command/get.pm
deleted file mode 100644
index a1730ef1..00000000
--- a/fml/lib/FML/Command/get.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-#-*- 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.
-#
-# $FML: get.pm,v 1.4 2001/06/17 08:57:09 fukachan Exp $
-#
-
-package FML::Command::get;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-=head1 NAME
-
-FML::Command::get - what is this
-
-=head1 SYNOPSIS
-
-not yet implemented
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=head2 C<new()>
-
-=cut
-
-
-sub new
-{
- my ($self) = @_;
- my ($type) = ref($self) || $self;
- my $me = {};
- return bless $me, $type;
-}
-
-
-=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::Command::get 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/mget.pm b/fml/lib/FML/Command/mget.pm
deleted file mode 100644
index 7e1a8c59..00000000
--- a/fml/lib/FML/Command/mget.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-#-*- 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.
-#
-# $FML: mget.pm,v 1.4 2001/06/17 08:57:09 fukachan Exp $
-#
-
-package FML::Command::mget;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-=head1 NAME
-
-FML::Command::mget - what is this
-
-=head1 SYNOPSIS
-
-not yet implemented
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=head2 C<new()>
-
-=cut
-
-
-sub new
-{
- my ($self) = @_;
- my ($type) = ref($self) || $self;
- my $me = {};
- return bless $me, $type;
-}
-
-
-=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::Command::mget 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
deleted file mode 100644
index 6317ef4d..00000000
--- a/fml/lib/FML/Command/newml.pm
+++ /dev/null
@@ -1,87 +0,0 @@
-#-*- 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.
-#
-# $FML: newml.pm,v 1.7 2001/07/15 12:03:37 fukachan Exp $
-#
-
-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
-
- use FML::Command::newml;
- $obj = new FML::Command::newml;
- $obj->newml($curproc, $optargs);
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=head2 C<newml($curproc, $optargs)>
-
-=cut
-
-
-sub newml
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $main_cf = $curproc->{ main_cf };
- my $member_map = $config->{ primary_member_map };
- my $recipient_map = $config->{ primary_recipient_map };
- my $ml_name = $optargs->{ ml_name };
-
- # fundamental check
- croak("\$ml_name is not specified") unless $ml_name;
-
- my $ml_home_prefix = $main_cf->{ ml_home_prefix };
- my $ml_home_dir = "$ml_home_prefix/$ml_name";
-
- use File::Utils qw(mkdirhier copy);
- unless (-d $ml_home_dir) {
- mkdirhier( $ml_home_dir, $config->{ default_dir_mode } || 0755 );
-
- use File::Spec;
-
- my $default_config_dir = $main_cf->{ default_config_dir };
- my $src = File::Spec->catfile($default_config_dir, "config.cf");
- my $dst = File::Spec->catfile($ml_home_dir, 'config.cf');
- copy($src, $dst);
- }
- else {
- warn("$ml_name already exists");
- }
-}
-
-
-=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::Command::newml 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/remove.pm b/fml/lib/FML/Command/remove.pm
deleted file mode 100644
index 2c5ecbb4..00000000
--- a/fml/lib/FML/Command/remove.pm
+++ /dev/null
@@ -1,54 +0,0 @@
-#-*- 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.
-#
-# $FML: remove.pm,v 1.6 2001/05/27 14:27:54 fukachan Exp $
-#
-
-package FML::Command::remove;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use FML::Command::unsubscribe;
-@ISA = qw(FML::Command::unsubscribe);
-
-sub remove
-{
- my ($self, $curproc, $optargs) = @_;
- $self->SUPER::unsubscribe($curproc, $optargs);
-}
-
-
-=head1 NAME
-
-FML::Command::remove - remove the specified member
-
-=head1 SYNOPSIS
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=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::Command::remove 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/resign.pm b/fml/lib/FML/Command/resign.pm
deleted file mode 100644
index 1042d8c1..00000000
--- a/fml/lib/FML/Command/resign.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-#-*- 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.
-#
-# $FML: resign.pm,v 1.7 2001/07/15 12:03:37 fukachan Exp $
-#
-
-package FML::Command::resign;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use FML::Command::unsubscribe;
-@ISA = qw(FML::Command::unsubscribe);
-
-sub resign
-{
- my ($self, $curproc, $optargs) = @_;
- $self->unsubscribe($curproc, $optargs);
-}
-
-=head1 NAME
-
-FML::Command::resign - alias of "unsubscribe" command
-
-=head1 SYNOPSIS
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-all requests are forwarded to C<FML::Command::unsubscribe>.
-
-=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::Command::resign 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/signoff.pm b/fml/lib/FML/Command/signoff.pm
deleted file mode 100644
index 79d3b87d..00000000
--- a/fml/lib/FML/Command/signoff.pm
+++ /dev/null
@@ -1,52 +0,0 @@
-#-*- 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.
-#
-# $FML: signoff.pm,v 1.2 2001/06/17 08:57:10 fukachan Exp $
-#
-
-package FML::Command::signoff;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use FML::Command::unsubscribe;
-@ISA = qw(FML::Command::unsubscribe);
-
-sub signoff
-{
- my ($self, $curproc, $optargs) = @_;
- $self->SUPER::unsubscribe($curproc, $optargs);
-}
-
-
-=head1 NAME
-
-FML::Command::signoff - signoff the specified member
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=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::Command::signoff 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/subscribe.pm b/fml/lib/FML/Command/subscribe.pm
deleted file mode 100644
index e85b08d9..00000000
--- a/fml/lib/FML/Command/subscribe.pm
+++ /dev/null
@@ -1,73 +0,0 @@
-#-*- 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.
-#
-# $FML: subscribe.pm,v 1.9 2001/05/27 14:27:54 fukachan Exp $
-#
-
-package FML::Command::subscribe;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-=head1 NAME
-
-FML::Command::subscribe - subscribe a new member
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-See C<FML::Command> for more details.
-
-=head1 METHODS
-
-=head2 C<subscribe( $address )>
-
-=cut
-
-
-sub subscribe
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $member_map = $config->{ primary_member_map };
- my $recipient_map = $config->{ primary_recipient_map };
- my $options = $optargs->{ options };
- my $address = $optargs->{ address } || $options->[ 0 ];
-
- # fundamental check
- croak("\$member_map is not specified") unless $member_map;
- croak("\$recipient_map is not specified") unless $recipient_map;
-
- use IO::Adapter;
- my $obj = new IO::Adapter $member_map;
- $obj->add( $address );
-
- $obj = new IO::Adapter $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::Command::subscribe 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/unsubscribe.pm b/fml/lib/FML/Command/unsubscribe.pm
deleted file mode 100644
index 62b597bf..00000000
--- a/fml/lib/FML/Command/unsubscribe.pm
+++ /dev/null
@@ -1,71 +0,0 @@
-#-*- 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.
-#
-# $FML: unsubscribe.pm,v 1.9 2001/05/27 14:27:54 fukachan Exp $
-#
-
-package FML::Command::unsubscribe;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-=head1 NAME
-
-FML::Command::unsubscribe - remove the specified member
-
-=head1 SYNOPSIS
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=cut
-
-
-sub unsubscribe
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $member_map = $config->{ primary_member_map };
- my $recipient_map = $config->{ primary_recipient_map };
- my $options = $optargs->{ options };
- my $address = $optargs->{ address } || $options->[ 0 ];
-
- # fundamental check
- croak("\$member_map is not specified") unless $member_map;
- croak("\$recipient_map is not specified") unless $recipient_map;
-
- use IO::Adapter;
- my $obj = new IO::Adapter $member_map;
- $obj->delete( $address );
-
- $obj = new IO::Adapter $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::Command::unsubscribe appeared in fml5 mailing list driver package.
-See C<http://www.fml.org/> for more details.
-
-=cut
-
-
-1;