summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-03-13 07:41:58 +0000
committerfukachan <fukachan>2004-03-13 07:41:58 +0000
commit5c42da5bf0605fdd96ca00c78e63ca79763f3a04 (patch)
treeb82535996ad8c0a7f704bb25f9794c7965cd8b17 /fml
parenta498b509e6f7b85848d3112c46f7d6f2f0fef223 (diff)
downloadfml8-5c42da5bf0605fdd96ca00c78e63ca79763f3a04.tar.gz
fml8-5c42da5bf0605fdd96ca00c78e63ca79763f3a04.tar.bz2
fml8-5c42da5bf0605fdd96ca00c78e63ca79763f3a04.zip
implement set_sender() and get_sender().
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Credential.pm39
1 files changed, 37 insertions, 2 deletions
diff --git a/fml/lib/FML/Credential.pm b/fml/lib/FML/Credential.pm
index 47265e01..cb445f0f 100644
--- a/fml/lib/FML/Credential.pm
+++ b/fml/lib/FML/Credential.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: Credential.pm,v 1.53 2004/01/02 14:42:45 fukachan Exp $
+# $FML: Credential.pm,v 1.54 2004/01/18 14:04:31 fukachan Exp $
#
package FML::Credential;
@@ -495,6 +495,12 @@ sub match_system_special_accounts
=head2 sender()
+same as get_sender().
+
+=head2 set_sender()
+
+=head2 get_sender()
+
return the mail address of the mail sender who kicks off this fml
process.
@@ -507,7 +513,36 @@ process.
sub sender
{
my ($self) = @_;
- $Credential{ sender };
+ $self->get_sender();
+}
+
+
+# Descriptions: set the mail sender.
+# Arguments: OBJ($self) STR($address)
+# Side Effects: none
+# Return Value: STR(mail address)
+sub set_sender
+{
+ my ($self, $address) = @_;
+
+ if (defined $address && $address) {
+ $Credential{ sender } = $address;
+ }
+ else {
+ croak("wrong credential usage");
+ }
+}
+
+
+# Descriptions: return the mail sender.
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: STR(mail address)
+sub get_sender
+{
+ my ($self) = @_;
+
+ return( $Credential{ sender } || '' );
}