diff options
| author | fukachan <fukachan> | 2003-12-30 03:52:07 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-12-30 03:52:07 +0000 |
| commit | bf93b153e4e7e0ca52bce15df75c6460891ecaf9 (patch) | |
| tree | 4395522503a1b70f2d9fbaf70fcc4cc6c93070cd /fml/lib/FML/Header | |
| parent | 226856777090a30c85b15bd288f7690914d683bb (diff) | |
| download | fml8-bf93b153e4e7e0ca52bce15df75c6460891ecaf9.tar.gz fml8-bf93b153e4e7e0ca52bce15df75c6460891ecaf9.tar.bz2 fml8-bf93b153e4e7e0ca52bce15df75c6460891ecaf9.zip | |
get() return null string if the value is undefined
Diffstat (limited to 'fml/lib/FML/Header')
| -rw-r--r-- | fml/lib/FML/Header/MessageID.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fml/lib/FML/Header/MessageID.pm b/fml/lib/FML/Header/MessageID.pm index 8c61a0c2..379e921c 100644 --- a/fml/lib/FML/Header/MessageID.pm +++ b/fml/lib/FML/Header/MessageID.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: MessageID.pm,v 1.15 2003/09/19 13:30:34 tmu Exp $ +# $FML: MessageID.pm,v 1.16 2003/11/11 10:26:55 tmu Exp $ # package FML::Header::MessageID; @@ -110,6 +110,7 @@ sub db_close =head2 get($key) get value for the key $key in message-id database. +return '' if not found nor defined. =head2 set($key, $value) @@ -127,12 +128,12 @@ sub get my ($self, $key) = @_; my $db = $self->{ _db }; - # XXX-TODO: what should we do if undefined ? if (defined $db) { - return $db->{ $key }; + return( $db->{ $key } || '' ); + } + else { + return ''; } - - undef; } |
