summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/User
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-06-26 11:47:55 +0000
committerfukachan <fukachan>2004-06-26 11:47:55 +0000
commit06114f7bdcc1cf0bfd5a33a73405f607bbbfe7dd (patch)
tree88efd68768f0a4254851280c908a8642590df808 /fml/lib/FML/Command/User
parent8a4ad321fb933d12ba65adf4354b3fd8f4108981 (diff)
downloadfml8-06114f7bdcc1cf0bfd5a33a73405f607bbbfe7dd.tar.gz
fml8-06114f7bdcc1cf0bfd5a33a73405f607bbbfe7dd.tar.bz2
fml8-06114f7bdcc1cf0bfd5a33a73405f607bbbfe7dd.zip
overhaul: fix comments, messages and style.
Diffstat (limited to 'fml/lib/FML/Command/User')
-rw-r--r--fml/lib/FML/Command/User/chaddr.pm17
-rw-r--r--fml/lib/FML/Command/User/confirm.pm16
-rw-r--r--fml/lib/FML/Command/User/deny.pm10
-rw-r--r--fml/lib/FML/Command/User/get.pm20
-rw-r--r--fml/lib/FML/Command/User/guide.pm10
-rw-r--r--fml/lib/FML/Command/User/help.pm10
-rw-r--r--fml/lib/FML/Command/User/objective.pm10
-rw-r--r--fml/lib/FML/Command/User/off.pm8
-rw-r--r--fml/lib/FML/Command/User/on.pm11
-rw-r--r--fml/lib/FML/Command/User/subscribe.pm14
10 files changed, 58 insertions, 68 deletions
diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm
index aa7753a3..01e0b5ab 100644
--- a/fml/lib/FML/Command/User/chaddr.pm
+++ b/fml/lib/FML/Command/User/chaddr.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: chaddr.pm,v 1.29 2004/02/15 04:38:30 fukachan Exp $
+# $FML: chaddr.pm,v 1.30 2004/04/23 04:10:31 fukachan Exp $
#
package FML::Command::User::chaddr;
@@ -15,7 +15,7 @@ use Carp;
=head1 NAME
-FML::Command::User::chaddr - change subscribed address
+FML::Command::User::chaddr - change subscribed address.
=head1 SYNOPSIS
@@ -37,7 +37,7 @@ address in the mail header, "Reply-To" is ignored.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -50,14 +50,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
@@ -81,7 +81,7 @@ sub process
# XXX 1) may be not writable.
# XXX 2) ambigous and dangerous
# XXX since the map is under controlled by other module.
- # XXX for example, one of member_maps is under admin_member_maps.
+ # XXX for example, $member_maps contains different classes.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
@@ -128,7 +128,8 @@ sub process
if ($cred->is_member($old_addr) || $cred->is_member($new_addr)) {
$curproc->log("chaddr request, try confirmation");
- # XXX-TODO: should be FML::Confirm { ... address => [ @addr ] } ?
+ # XXX-TODO: no confirmation case ?
+ # XXX-TODO: change arg ? FML::Confirm { ... address => [ @addr ] }
use FML::Confirm;
my $confirm = new FML::Confirm $curproc, {
keyword => $keyword,
@@ -141,7 +142,7 @@ sub process
$curproc->reply_message_nl('command.confirm', '', $optargs);
$curproc->reply_message("\n$id\n", $optargs);
}
- # try confirmation before chaddr
+ # try confirmation before chaddr.
else {
$curproc->reply_message_nl('error.not_member', '', $optargs);
$cred->set_compare_level( $compare_level );
diff --git a/fml/lib/FML/Command/User/confirm.pm b/fml/lib/FML/Command/User/confirm.pm
index d6189c4c..a178acd9 100644
--- a/fml/lib/FML/Command/User/confirm.pm
+++ b/fml/lib/FML/Command/User/confirm.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: confirm.pm,v 1.31 2004/04/22 10:37:35 fukachan Exp $
+# $FML: confirm.pm,v 1.32 2004/04/23 04:10:31 fukachan Exp $
#
package FML::Command::User::confirm;
@@ -14,7 +14,7 @@ use Carp;
=head1 NAME
-FML::Command::User::confirm - allow action after confirmation
+FML::Command::User::confirm - allow action after confirmation.
=head1 SYNOPSIS
@@ -31,7 +31,7 @@ execute the actual corresponding process if the confirmation succeeds.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -44,21 +44,21 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
sub lock_channel { return 'command_serialize';}
-# Descriptions: addresses to inform a message copy to
+# Descriptions: addresses to inform a message copy to.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: ARREY_REF
@@ -103,8 +103,8 @@ sub process
# get class and id from buffer, for example,
# "confirm subscribe 813f42fa2aa84bbba500ed3d2781dea6"
- # XXX $keyword not starts at the begining of this line.
- # XXX for example, "confirm", "> confirm" and "xxx> confirm ..."
+ # XXX $keyword may not start at the begining of this line.
+ # XXX For example, "confirm", "> confirm" and "xxx> confirm ..."
# XXX-TODO: we should move this check to FML::Command::__SOME_WHERE__ ?
if ($command =~ /$keyword\s+(\w+)\s+([\w\d]+)/) {
($class, $id) = ($1, $2);
diff --git a/fml/lib/FML/Command/User/deny.pm b/fml/lib/FML/Command/User/deny.pm
index 89966852..5b2b51cf 100644
--- a/fml/lib/FML/Command/User/deny.pm
+++ b/fml/lib/FML/Command/User/deny.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: deny.pm,v 1.11 2004/04/23 04:10:32 fukachan Exp $
+# $FML: deny.pm,v 1.12 2004/04/23 04:15:58 fukachan Exp $
#
package FML::Command::User::deny;
@@ -17,7 +17,7 @@ use FML::Command::SendFile;
=head1 NAME
-FML::Command::User::deny - send back deny file
+FML::Command::User::deny - send back deny message.
=head1 SYNOPSIS
@@ -34,7 +34,7 @@ See C<FML::Command> for more details.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -47,14 +47,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 0;}
-# Descriptions: send deny file by FML::Command::SendFile.
+# Descriptions: send deny message via FML::Command::SendFile.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Command/User/get.pm b/fml/lib/FML/Command/User/get.pm
index c4bcd19c..b9a5e308 100644
--- a/fml/lib/FML/Command/User/get.pm
+++ b/fml/lib/FML/Command/User/get.pm
@@ -4,7 +4,7 @@
# 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.21 2004/04/23 04:10:32 fukachan Exp $
+# $FML: get.pm,v 1.22 2004/04/23 04:15:58 fukachan Exp $
#
package FML::Command::User::get;
@@ -17,7 +17,7 @@ use FML::Command::SendFile;
=head1 NAME
-FML::Command::User::get - send back article(s)
+FML::Command::User::get - send back article(s).
=head1 SYNOPSIS
@@ -32,7 +32,7 @@ send back article(s).
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -45,25 +45,20 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
sub lock_channel { return 'article_spool_modify';}
-=head2 check_limit($curproc, $command_args)
-
-=cut
-
-
# Descriptions: check the limit specific to this command.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
@@ -105,11 +100,6 @@ sub check_limit
}
-=head2 process()
-
-=cut
-
-
# Descriptions: send articles (filename =~ /^\d+/$) by FML::Command::SendFile.
# This module is called after
# FML::Process::Command::_can_accpet_command() already checks the
diff --git a/fml/lib/FML/Command/User/guide.pm b/fml/lib/FML/Command/User/guide.pm
index 0aa517a4..a81eeafb 100644
--- a/fml/lib/FML/Command/User/guide.pm
+++ b/fml/lib/FML/Command/User/guide.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: guide.pm,v 1.15 2004/04/23 04:10:32 fukachan Exp $
+# $FML: guide.pm,v 1.16 2004/04/23 04:15:58 fukachan Exp $
#
package FML::Command::User::guide;
@@ -18,7 +18,7 @@ use FML::Command::SendFile;
=head1 NAME
-FML::Command::User::guide - send back guide file
+FML::Command::User::guide - send back guide message.
=head1 SYNOPSIS
@@ -35,7 +35,7 @@ See C<FML::Command> for more details.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -48,14 +48,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 0;}
-# Descriptions: send guide file by FML::Command::SendFile.
+# Descriptions: send guide message via FML::Command::SendFile.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Command/User/help.pm b/fml/lib/FML/Command/User/help.pm
index fe0e562a..8df16112 100644
--- a/fml/lib/FML/Command/User/help.pm
+++ b/fml/lib/FML/Command/User/help.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: help.pm,v 1.19 2004/04/23 04:10:32 fukachan Exp $
+# $FML: help.pm,v 1.20 2004/04/23 04:15:58 fukachan Exp $
#
package FML::Command::User::help;
@@ -18,7 +18,7 @@ use FML::Command::SendFile;
=head1 NAME
-FML::Command::User::help - send back help file
+FML::Command::User::help - send back help message.
=head1 SYNOPSIS
@@ -35,7 +35,7 @@ See C<FML::Command> for more details.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -48,14 +48,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 0;}
-# Descriptions: send help file by FML::Command::SendFile.
+# Descriptions: send help message via FML::Command::SendFile.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Command/User/objective.pm b/fml/lib/FML/Command/User/objective.pm
index 6e690508..a1c59396 100644
--- a/fml/lib/FML/Command/User/objective.pm
+++ b/fml/lib/FML/Command/User/objective.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: objective.pm,v 1.11 2004/04/23 04:10:32 fukachan Exp $
+# $FML: objective.pm,v 1.12 2004/04/23 04:15:58 fukachan Exp $
#
package FML::Command::User::objective;
@@ -17,7 +17,7 @@ use FML::Command::SendFile;
=head1 NAME
-FML::Command::User::objective - send back ML's objective file
+FML::Command::User::objective - send back ML's objective message.
=head1 SYNOPSIS
@@ -34,7 +34,7 @@ See C<FML::Command> for more details.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -47,14 +47,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 0;}
-# Descriptions: send back objective file by FML::Command::SendFile.
+# Descriptions: send back objective message via FML::Command::SendFile.
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm
index e5ae0eba..40c981cb 100644
--- a/fml/lib/FML/Command/User/off.pm
+++ b/fml/lib/FML/Command/User/off.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: off.pm,v 1.16 2004/02/24 14:36:53 fukachan Exp $
+# $FML: off.pm,v 1.17 2004/04/23 04:10:32 fukachan Exp $
#
package FML::Command::User::off;
@@ -33,7 +33,7 @@ succeeds.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -46,14 +46,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm
index 1b2f10ef..050ff12f 100644
--- a/fml/lib/FML/Command/User/on.pm
+++ b/fml/lib/FML/Command/User/on.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: on.pm,v 1.16 2004/02/24 14:36:53 fukachan Exp $
+# $FML: on.pm,v 1.17 2004/04/23 04:10:32 fukachan Exp $
#
package FML::Command::User::on;
@@ -33,7 +33,7 @@ After confirmation succeeds, on process proceeds.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -46,14 +46,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
@@ -78,7 +78,7 @@ sub process
# XXX 1) may be not writable.
# XXX 2) ambigous and dangerous
# XXX since the map is under controlled by other module.
- # XXX for example, one of member_maps is under admin_member_maps.
+ # XXX for example, $member_maps contains different classes.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
@@ -98,7 +98,6 @@ sub process
return;
}
- # XXX-TODO: this message is correct ?
# if already recipient, on request is wrong.
if ($cred->is_recipient($address)) {
$curproc->reply_message_nl('error.already_recipient',
diff --git a/fml/lib/FML/Command/User/subscribe.pm b/fml/lib/FML/Command/User/subscribe.pm
index e4458fbf..aa276b59 100644
--- a/fml/lib/FML/Command/User/subscribe.pm
+++ b/fml/lib/FML/Command/User/subscribe.pm
@@ -4,7 +4,7 @@
# 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.27 2004/03/13 11:46:33 fukachan Exp $
+# $FML: subscribe.pm,v 1.28 2004/04/23 04:10:32 fukachan Exp $
#
package FML::Command::User::subscribe;
@@ -15,7 +15,7 @@ use Carp;
=head1 NAME
-FML::Command::User::subscribe - subscribe request handling
+FML::Command::User::subscribe - subscribe request handling.
=head1 SYNOPSIS
@@ -33,7 +33,7 @@ After confirmation succeeds, subcribe process proceeds.
=cut
-# Descriptions: standard constructor
+# Descriptions: constructor.
# Arguments: OBJ($self)
# Side Effects: none
# Return Value: OBJ
@@ -46,14 +46,14 @@ sub new
}
-# Descriptions: need lock or not
+# Descriptions: need lock or not.
# Arguments: none
# Side Effects: none
# Return Value: NUM( 1 or 0)
sub need_lock { 1;}
-# Descriptions: lock channel
+# Descriptions: lock channel.
# Arguments: none
# Side Effects: none
# Return Value: STR
@@ -78,7 +78,7 @@ sub process
# XXX 1) may be not writable.
# XXX 2) ambigous and dangerous
# XXX since the map is under controlled by other module.
- # XXX for example, one of member_maps is under admin_member_maps.
+ # XXX for example, $member_maps contains differenct classes.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
@@ -100,7 +100,7 @@ sub process
}
}
- # exatct match as could as possible.
+ # exact match as could as possible.
my $compare_level = $cred->get_compare_level();
$cred->set_compare_level( 100 );