summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/Admin/dir.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-03-24 11:26:44 +0000
committerfukachan <fukachan>2002-03-24 11:26:44 +0000
commit7300273b63deb72226245e06afae952ecb7cb5aa (patch)
tree45bad188273a5f1297e49849d3f8bb97fa1d5a57 /fml/lib/FML/Command/Admin/dir.pm
parentb2a3ca8e02584787d674b926c121bdbb6bd706e3 (diff)
downloadfml8-7300273b63deb72226245e06afae952ecb7cb5aa.tar.gz
fml8-7300273b63deb72226245e06afae952ecb7cb5aa.tar.bz2
fml8-7300273b63deb72226245e06afae952ecb7cb5aa.zip
support admin {dir,ls} command
Diffstat (limited to 'fml/lib/FML/Command/Admin/dir.pm')
-rw-r--r--fml/lib/FML/Command/Admin/dir.pm116
1 files changed, 116 insertions, 0 deletions
diff --git a/fml/lib/FML/Command/Admin/dir.pm b/fml/lib/FML/Command/Admin/dir.pm
new file mode 100644
index 00000000..6ee36ff7
--- /dev/null
+++ b/fml/lib/FML/Command/Admin/dir.pm
@@ -0,0 +1,116 @@
+#-*- perl -*-
+#
+# Copyright (C) 2002 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: dir.pm,v 1.1 2002/03/19 11:13:45 fukachan Exp $
+#
+
+package FML::Command::Admin::dir;
+use strict;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+use Carp;
+
+
+=head1 NAME
+
+FML::Command::Admin::dir - dir file operations
+
+=head1 SYNOPSIS
+
+See C<FML::Command> for more details.
+
+=head1 DESCRIPTION
+
+dir a new address.
+
+=head1 METHODS
+
+=head2 C<process($curproc, $command_args)>
+
+=cut
+
+
+# Descriptions: standard constructor
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: OBJ
+sub new
+{
+ my ($self) = @_;
+ my ($type) = ref($self) || $self;
+ my $me = {};
+ return bless $me, $type;
+}
+
+
+# Descriptions: need lock or not
+# Arguments: none
+# Side Effects: none
+# Return Value: NUM( 1 or 0)
+sub need_lock { 0;}
+
+
+# Descriptions: dir a new user
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $member_map $recipient_map
+# Return Value: none
+sub process
+{
+ my ($self, $curproc, $command_args) = @_;
+ my $config = $curproc->{ config };
+ my $log_file = $config->{ log_file };
+ my $options = $command_args->{ options };
+ my $du_args = {};
+ my @argv = ();
+
+ # analyze ...
+ for my $x (@$options) {
+ if ($x =~ /^(\-[A-Za-z]+)$/) {
+ $du_args->{ opt_ls } = $1;
+ }
+ else {
+ push(@argv, $x);
+ }
+ }
+ $du_args->{ options } = \@argv;
+
+ use FML::Command::DirUtils;
+ my $obj = new FML::Command::DirUtils;
+ $obj->dir($curproc, $command_args, $du_args);
+}
+
+
+# Descriptions: log a new user
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $member_map $recipient_map
+# Return Value: none
+sub cgi_menu
+{
+ my ($self, $curproc, $args, $command_args) = @_;
+
+ ;
+}
+
+
+=head1 AUTHOR
+
+Ken'ichi Fukamachi
+
+=head1 COPYRIGHT
+
+Copyright (C) 2002 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::Admin::log appeared in fml5 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
+1;