diff options
| author | fukachan <fukachan> | 2002-12-20 03:40:11 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-12-20 03:40:11 +0000 |
| commit | eebea87256b7cc29db4ff30166e1b465f7b554aa (patch) | |
| tree | 70cd10fa56b5eff2ef501bc7a686b21739046359 /fml/lib/FML/Command/Admin/off.pm | |
| parent | 33cc3216e24c18b345adb828c8e3b3ba7e5ca920 (diff) | |
| download | fml8-eebea87256b7cc29db4ff30166e1b465f7b554aa.tar.gz fml8-eebea87256b7cc29db4ff30166e1b465f7b554aa.tar.bz2 fml8-eebea87256b7cc29db4ff30166e1b465f7b554aa.zip | |
fix comments and error messages.
add defined() more.
Diffstat (limited to 'fml/lib/FML/Command/Admin/off.pm')
| -rw-r--r-- | fml/lib/FML/Command/Admin/off.pm | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fml/lib/FML/Command/Admin/off.pm b/fml/lib/FML/Command/Admin/off.pm index aabe9b9e..5f3be856 100644 --- a/fml/lib/FML/Command/Admin/off.pm +++ b/fml/lib/FML/Command/Admin/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.2 2002/09/11 23:18:08 fukachan Exp $ +# $FML: off.pm,v 1.3 2002/09/22 14:56:45 fukachan Exp $ # package FML::Command::Admin::off; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::Admin::off - change off mode specified member +FML::Command::Admin::off - change delivery mode from real time to digest. =head1 SYNOPSIS @@ -23,7 +23,7 @@ See C<FML::Command> for more details. =head1 DESCRIPTION -change off mode specified member +change delivery mode from real time to digest. =head1 METHODS @@ -32,7 +32,7 @@ change off mode specified member =cut -# Descriptions: standard constructor +# Descriptions: constructor. # Arguments: OBJ($self) # Side Effects: none # Return Value: OBJ @@ -52,7 +52,7 @@ sub new sub need_lock { 1;} -# Descriptions: change off mode specified member +# Descriptions: change delivery mode from real time to digest. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) # Side Effects: update $recipient_map # Return Value: none @@ -60,13 +60,16 @@ sub process { my ($self, $curproc, $command_args) = @_; my $config = $curproc->{ config }; + + # XXX-TODO: we should use $config->get_as_array_ref(). my @recipient_map = split(/\s+/, $config->{ recipient_maps }); my $options = $command_args->{ options }; my $address = $command_args->{ command_data } || $options->[ 0 ]; # fundamental check - croak("address is not specified") unless defined $address; - croak("\@recipient_map is not specified") unless @recipient_map; + croak("address not defined") unless defined $address; + croak("address not specified") unless $address; + croak("\@recipient_map not specified") unless @recipient_map; # FML::Command::UserControl specific parameters my $uc_args = { @@ -75,6 +78,7 @@ sub process }; my $r = ''; + # XXX-TODO: we expect userdel() validates $address. eval q{ use FML::Command::UserControl; my $obj = new FML::Command::UserControl; |
